use of WayofTime.bloodmagic.soul.IDemonWillGem in project BloodMagic by WayofTime.
the class BlockDemonCrucible method onBlockActivated.
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
ItemStack heldItem = player.getHeldItem(hand);
TileDemonCrucible crucible = (TileDemonCrucible) world.getTileEntity(pos);
if (crucible == null || player.isSneaking())
return false;
if (!heldItem.isEmpty()) {
if (!(heldItem.getItem() instanceof IDiscreteDemonWill) && !(heldItem.getItem() instanceof IDemonWillGem)) {
return true;
}
}
Utils.insertItemToTile(crucible, player);
world.notifyBlockUpdate(pos, state, state, 3);
return true;
}
Aggregations