Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EntityFoo extends EntityCreature{
- public EntityFoo(World worldIn){
- super(worldIn);
- this.forgePathfinderFlag(true); // tells class to init the forge pathfinder and replace the vanilla one (what is same as the vanilla one but with the "block preference" feature)
- this.tasks.addTask(......);
- this(.navigator).someKindOfPreferenceMap.put(FooModBlocks.road, 1.5F); // 50% more desireable to walk on the specified block (distance of path points with block below matching the specified block is divided thus possibly overriding a shorter path), Type HashMap<Block,Float>
- }
- }
- //forge patch/new class: everything is extended except the part where a path is being chosen. Logic process: 1. Try to match block that is being walked. 2. if found divide distance of path point, if nothing found use vanilla PathNodeType.
Add Comment
Please, Sign In to add comment