use of net.minecraft.world.entity.ai.control.JumpControl in project Citizens2 by CitizensDev.
the class NMSImpl method setShouldJump.
@Override
public void setShouldJump(org.bukkit.entity.Entity entity) {
Entity handle = NMSImpl.getHandle(entity);
if (handle == null)
return;
if (handle instanceof Mob) {
JumpControl controller = ((Mob) handle).getJumpControl();
controller.jump();
} else if (handle instanceof EntityHumanNPC) {
((EntityHumanNPC) handle).setShouldJump();
}
}
use of net.minecraft.world.entity.ai.control.JumpControl in project Citizens2 by CitizensDev.
the class NMSImpl method setShouldJump.
@Override
public void setShouldJump(org.bukkit.entity.Entity entity) {
Entity handle = NMSImpl.getHandle(entity);
if (handle == null)
return;
if (handle instanceof Mob) {
JumpControl controller = ((Mob) handle).getJumpControl();
controller.jump();
} else if (handle instanceof EntityHumanNPC) {
((EntityHumanNPC) handle).setShouldJump();
}
}
use of net.minecraft.world.entity.ai.control.JumpControl in project AlexsMobs by Alex-the-666.
the class EntityWarpedToad method switchNavigator.
private void switchNavigator(boolean onLand) {
if (onLand) {
this.jumpControl = new EntityWarpedToad.JumpHelperController(this);
this.moveControl = new EntityWarpedToad.MoveHelperController(this);
this.navigation = createNavigation(level);
this.isLandNavigator = true;
} else {
this.jumpControl = new JumpControl(this);
this.moveControl = new AquaticMoveController(this, 1.2F);
this.navigation = new BoneSerpentPathNavigator(this, level);
this.isLandNavigator = false;
}
}
Aggregations