use of net.minecraft.client.entity.EntityPlayerSP in project ArsMagica2 by Mithion.
the class ItemSpellBook method onUpdate.
@Override
@SideOnly(Side.CLIENT)
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
super.onUpdate(stack, world, entity, par4, par5);
if (entity instanceof EntityPlayerSP) {
EntityPlayerSP player = (EntityPlayerSP) entity;
ItemStack usingItem = player.getItemInUse();
if (usingItem != null && usingItem.getItem() == this) {
if (SkillData.For(player).isEntryKnown(SkillTreeManager.instance.getSkillTreeEntry(SkillManager.instance.getSkill("SpellMotion")))) {
player.movementInput.moveForward *= 2.5F;
player.movementInput.moveStrafe *= 2.5F;
}
}
}
}
use of net.minecraft.client.entity.EntityPlayerSP in project ArsMagica2 by Mithion.
the class ItemSpellStaff method onUpdate.
@Override
@SideOnly(Side.CLIENT)
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5) {
super.onUpdate(stack, world, entity, par4, par5);
if (entity instanceof EntityPlayerSP) {
EntityPlayerSP player = (EntityPlayerSP) entity;
ItemStack usingItem = player.getItemInUse();
if (usingItem != null && usingItem.getItem() == this) {
if (SkillData.For(player).isEntryKnown(SkillTreeManager.instance.getSkillTreeEntry(SkillManager.instance.getSkill("SpellMotion")))) {
player.movementInput.moveForward *= 2.5F;
player.movementInput.moveStrafe *= 2.5F;
}
}
}
}
use of net.minecraft.client.entity.EntityPlayerSP in project Railcraft by Railcraft.
the class PacketGuiString method readData.
@Override
public void readData(RailcraftInputStream data) throws IOException {
windowId = data.readByte();
dataId = data.readByte();
str = data.readUTF();
EntityPlayerSP player = FMLClientHandler.instance().getClient().thePlayer;
if (player.openContainer instanceof RailcraftContainer && player.openContainer.windowId == windowId)
((RailcraftContainer) player.openContainer).updateString(dataId, str);
}
use of net.minecraft.client.entity.EntityPlayerSP in project Railcraft by Railcraft.
the class PacketGuiData method readData.
@Override
public void readData(RailcraftInputStream data) throws IOException {
windowId = data.readByte();
dataId = data.readByte();
EntityPlayerSP player = FMLClientHandler.instance().getClient().thePlayer;
if (player.openContainer instanceof RailcraftContainer && player.openContainer.windowId == windowId)
((RailcraftContainer) player.openContainer).updateData(dataId, data);
}
use of net.minecraft.client.entity.EntityPlayerSP in project Railcraft by Railcraft.
the class PacketGuiInteger method readData.
@Override
public void readData(RailcraftInputStream data) throws IOException {
windowId = data.readByte();
dataId = data.readByte();
value = data.readInt();
EntityPlayerSP player = FMLClientHandler.instance().getClient().thePlayer;
if (player.openContainer != null && player.openContainer.windowId == windowId)
player.openContainer.updateProgressBar(dataId, value);
}
Aggregations