Search in sources :

Example 1 with WaterAndLandPathNavigator

use of io.github.bioplethora.entity.ai.navigator.WaterAndLandPathNavigator 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)

Example 2 with WaterAndLandPathNavigator

use of io.github.bioplethora.entity.ai.navigator.WaterAndLandPathNavigator in project bioplethora by AquexTheSeal.

the class BPAirWaterLandEntity method switchNavigator.

@Override
public void switchNavigator(boolean onLand) {
    if (onLand) {
        this.moveControl = new BPAirWaterLandEntity.MoveHelperController(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) 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)2 WaterAndLandPathNavigator (io.github.bioplethora.entity.ai.navigator.WaterAndLandPathNavigator)2 GroundPathNavigator (net.minecraft.pathfinding.GroundPathNavigator)2 MovementController (net.minecraft.entity.ai.controller.MovementController)1