summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/PathfinderGoalSelector.java
Commit message (Collapse)AuthorAgeLines
* Optimized a little too much. Update goals every tick again to avoid AI oddness.Travis Watkins2012-04-24-6/+2
|
* Avoid doing unnecessary range checks when we're looping from start to end.Travis Watkins2012-04-23-19/+30
| | | | | | | | | | | | | | | | | | Make EntityLiving call AI logic every tick again. Rework PathfinderGoalSelector logic. Adds UnsafeList for use in places where we use ArrayList and know we won't get index out of range errors. Added usage to World's tickEntities, Chunk's entitySlices to speed up searching for entities, and to PathfinderGoalSelector to speed up dealing with AI goals. Reworked logic in PathfinderGoalSelector with help from fullwall. This code no longer uses an extra ArrayList for setting up goals and only updates which goals should be run every other time it is called. Removed only calling PathfinderGoalSelector every other tick from EntityLiving as we now only setup new goals every other tick. This ensures existing goals run every tick to properly update mob movement.
* Optimize AI and EntityLiving tickingTravis Watkins2012-04-21-12/+19
| | | | | | | | Reduce usage of getCubes as it is an expensive call. Remove iterator usage and object creation from PathfinderGoalSelector methods as these are called very often. Update EntityLiving goal selectors less often as this is still quite an expensive task.
* Add PathfinderGoalSelector for diff visibilityTravis Watkins2012-04-21-0/+91