Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. package net.minecraft.src;
  2. import net.minecraft.client.Minecraft;
  3.  
  4. public class ItemIceBook extends Item
  5. {
  6.  
  7.     public ItemIceBook(int i)
  8.     {
  9.         super(i);
  10.                 setItemName("iceBook");
  11.     }
  12.        
  13.     public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
  14.         {
  15.                 Minecraft minecraft = ModLoader.getMinecraftInstance();
  16.                 double x = minecraft.objectMouseOver.coordX;
  17.                 double y = minecraft.objectMouseOver.coordY;
  18.                 double z = minecraft.objectMouseover.coordZ;
  19.                 world.setBlockWithNotify((int) x, (int) y, (int) z, 1);
  20.                 --itemstack.stackSize;
  21.                 return itemstack;
  22.         }
  23.        
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement