use of de.Keyle.MyPet.compat.v1_18_R1.entity.ai.movement.MyPetAquaticMoveControl in project MyPet by xXKeyleXx.
the class VanillaNavigation method tick.
@Override
public void tick() {
// This switches between movesets enabling the pet to move naturally on land and water
EntityMyPet petEntity = (EntityMyPet) this.entityMyPet;
if (petEntity.isInWaterOrBubble() && this.entityMyPet instanceof EntityMyAquaticPet && !(petEntity.getMoveControl() instanceof MyPetAquaticMoveControl)) {
petEntity.switchMovement(new MyPetAquaticMoveControl(petEntity));
} else if (!petEntity.isInWaterOrBubble() && petEntity.getMoveControl() instanceof MyPetAquaticMoveControl) {
petEntity.switchMovement(new MoveControl(petEntity));
}
nav.tick();
}
use of de.Keyle.MyPet.compat.v1_18_R1.entity.ai.movement.MyPetAquaticMoveControl in project MyPet by xXKeyleXx.
the class VanillaNavigation method tick.
@Override
public void tick() {
// This switches between movesets enabling the pet to move naturally on land and water
EntityMyPet petEntity = (EntityMyPet) this.entityMyPet;
if (petEntity.isInWaterOrBubble() && this.entityMyPet instanceof EntityMyAquaticPet && !(petEntity.getMoveControl() instanceof MyPetAquaticMoveControl)) {
petEntity.switchMovement(new MyPetAquaticMoveControl(petEntity));
} else if (!petEntity.isInWaterOrBubble() && petEntity.getMoveControl() instanceof MyPetAquaticMoveControl) {
petEntity.switchMovement(new MoveControl(petEntity));
}
nav.tick();
}
Aggregations