Sunday, September 25, 2011

r1087 - Mob FOV Detection, Pathing Improvements, Script Profiling, plus more

Got bored last night working on 1.8.1 conversion and got caught with changing how mobs work for finding their target.
  • Living entities now have a FOV which is used to determine if a target can be seen (use debug or /renderfov to see the FOV angle).  Access the FOV on an EntityCreature via .fov
  • Pathing only simplifies the current segment walking along now.
  • Mobs won't update their path to their target unless they can see the target therefore they will now goto the last known position and then give up after a while.
  • Fixed muzzle flash getting stuck permantly on for zombies and skeletons when they can't see you.
  • Can get time stats on scripts via /scriptstats and reset the stats via /scriptstatreset. (Times are all in milliseconds)
  • Store block correctly renders its items and the sky renders correctly now when looking at a store block.
  • Bullets from mobs will now no longer come from their feet but instead their waist.
  • Lots of prep code work for 1.8.1 update including shifting blockID range of several blocks (id's 100-122 are now 150-172 and id's 152-155 are now 173-176).
  • Can disable random pathing on EntityCreature's via .canPathRandomly.
  • Can adjust random looking on EntityLiving
    • canLookRandomly - Will this entity try to look around randomly
    • randomLookVelocity - How fast will this entity look when randomly looking
    • randomLookRate - How often will the entity try to look randomly in ticks.
    • randomLookRateVariation - Max amount of ticks to add to the randomLookRate
    • randomLookNext - How many ticks before choosing a new random look velocity


  1. Cryect, i have a question, could you add way to manipulate camera with scripting? If it arledy is there, im sorry but if not, please :D

  2. I have a big problem. I'm getting severe lag whenever I play on adventurecraft. and I'm not the only one who has it. I can't even play it. Something you could look into?

  3. I need a mod for minecraft 1.5.2 that has it. Where do I find?