Advertisement
Benjamin_Loison

onItemRightClick - displayGuiScreen(new GuiPNJ(entity2))

Oct 24th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1.     @Override
  2.     @SideOnly(Side.CLIENT)
  3.     public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) {
  4.         Entity entity = Minecraft.getMinecraft().objectMouseOver.entityHit;
  5.         if (entity instanceof EntityMarketPNJ) {
  6.             EntityMarketPNJ entity2 = (EntityMarketPNJ) Minecraft.getMinecraft().objectMouseOver.entityHit;
  7.             Minecraft.getMinecraft().displayGuiScreen(new GuiPNJ(entity2));
  8.         }
  9.         return itemstack;
  10.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement