use of net.minecraft.util.MovementInputFromOptions in project Wizardry by TeamWizardry.
the class PotionNullMovement method onTick.
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onTick(TickEvent.ClientTickEvent event) {
Minecraft mc = Minecraft.getMinecraft();
EntityPlayerSP player = mc.player;
if (player == null)
return;
if (player.isPotionActive(ModPotions.NULL_MOVEMENT)) {
if (!(player.movementInput instanceof NullMovementInput))
player.movementInput = new NullMovementInput(player.movementInput);
} else if (!(player.movementInput instanceof MovementInputFromOptions))
player.movementInput = new MovementInputFromOptions(mc.gameSettings);
}
Aggregations