use of am2.entities.EntityAirSled in project ArsMagica2 by Mithion.
the class ClientProxy method sendLocalMovementData.
@Override
public void sendLocalMovementData(EntityLivingBase ent) {
if (ent == Minecraft.getMinecraft().thePlayer) {
if (ent.worldObj.isRemote && ent.ridingEntity instanceof EntityAirSled) {
EntityClientPlayerMP player = (EntityClientPlayerMP) ent;
player.sendQueue.addToSendQueue(new C03PacketPlayer.C05PacketPlayerLook(player.rotationYaw, player.rotationPitch, player.onGround));
player.sendQueue.addToSendQueue(new C0CPacketInput(player.moveStrafing, player.moveForward, player.movementInput.jump, player.movementInput.sneak));
}
}
}
use of am2.entities.EntityAirSled in project ArsMagica2 by Mithion.
the class ItemAirSled method onItemUseFirst.
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
if (!world.isRemote) {
EntityAirSled sled = new EntityAirSled(world);
sled.setPosition(x + hitX, y + hitY + 0.5, z + hitZ);
world.spawnEntityInWorld(sled);
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
return true;
}
return false;
}
Aggregations