Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onBlockClicked(World world, int x, int y, int z,
- EntityPlayer player) {
- System.out.println(player.getItemInUse());
- if (player.getItemInUse() != null && player.getItemInUse().itemID == ModItem.CONNECTOR_ID && this.blockID == ModBlock.COLOREDLAMP_ID && player.isSneaking())
- {
- world.setBlock(x, y, z, ModBlock.EMPTYCOLOREDLAMP_ID);
- world.markBlockForUpdate(x, y, z);
- if (!player.inventory.addItemStackToInventory(new ItemStack(Block.torchWood, 1)))
- player.dropItem(Block.torchWood.blockID, 1);
- }
- super.onBlockClicked(world, x, y, z, player);
- }
Advertisement
Add Comment
Please, Sign In to add comment