Search in sources :

Example 1 with MovementController

use of net.minecraft.entity.ai.controller.MovementController in project bioplethora by AquexTheSeal.

the class WaterAndLandAnimalEntity method switchNavigator.

public void switchNavigator(boolean onLand) {
    if (onLand) {
        this.moveControl = new MovementController(this);
        this.navigation = new GroundPathNavigator(this, level);
        this.isLandNavigator = true;
    } else {
        this.moveControl = new WaterMoveController(this, 1.2F);
        this.navigation = new WaterAndLandPathNavigator(this, level);
        this.isLandNavigator = false;
    }
}
Also used : GroundPathNavigator(net.minecraft.pathfinding.GroundPathNavigator) MovementController(net.minecraft.entity.ai.controller.MovementController) WaterAndLandPathNavigator(io.github.bioplethora.entity.ai.navigator.WaterAndLandPathNavigator) WaterMoveController(io.github.bioplethora.entity.ai.controller.WaterMoveController)

Aggregations

WaterMoveController (io.github.bioplethora.entity.ai.controller.WaterMoveController)1 WaterAndLandPathNavigator (io.github.bioplethora.entity.ai.navigator.WaterAndLandPathNavigator)1 MovementController (net.minecraft.entity.ai.controller.MovementController)1 GroundPathNavigator (net.minecraft.pathfinding.GroundPathNavigator)1