use of com.teamwizardry.wizardry.api.block.TileManaInteracter in project Wizardry by TeamWizardry.
the class ItemMagicWand method onItemUse.
@Override
public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (worldIn.isRemote)
return EnumActionResult.SUCCESS;
TileEntity tile = worldIn.getTileEntity(pos);
if (tile instanceof TileManaInteracter) {
CapManager manager = new CapManager(((TileManaInteracter) tile).getWizardryCap());
Minecraft.getMinecraft().player.sendChatMessage(manager.getMana() + " / " + manager.getMaxMana());
}
return EnumActionResult.SUCCESS;
}
Aggregations