Advertisement
Guest User

Untitled

a guest
Feb 19th, 2016
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. @Override
  2.     public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ)
  3.     {
  4.         Item item;
  5.         if(player.getCurrentEquippedItem() != null)
  6.         {
  7.             item = player.getCurrentEquippedItem().getItem();
  8.  
  9.             if (item == Item.getItemFromBlock(BlockRegistry.blaziumLampSlab))
  10.             {
  11.                 world.playSoundEffect(pos.getX(), pos.getY(), pos.getZ(), "random.glass3", 0.8F, player.getRNG().nextFloat() + 0.8F);
  12.                 world.setBlockState(pos, BlockRegistry.blaziumLamp.getDefaultState());
  13.             }
  14.         }
  15.  
  16.         return true;
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement