mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-26 13:53:07 +00:00
1.7.10 Files
Files added
This commit is contained in:
1 parent
393ea9b463
commit
a31efb2dc3
1768 files changed
+84831
No files matched your search
@@ -0,0 +1,36 @@
|
||||
package noppes.npcs.items;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.client.NoppesUtil;
|
||||
|
||||
public class ItemMoneyBag extends Item{
|
||||
|
||||
public ItemMoneyBag(int i)
|
||||
{
|
||||
//super(i - 26700 + CustomNpcs.ItemStartId);
|
||||
maxStackSize = 1;
|
||||
setCreativeTab(CustomItems.tab);
|
||||
}
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
if(par2World.isRemote) //Client check. Only server may create the moneybagcontents
|
||||
return par1ItemStack;
|
||||
|
||||
if(par1ItemStack.stackTagCompound == null) //You use the par1ItemStack.stackTagCompound to store your data in the item
|
||||
par1ItemStack.stackTagCompound = new NBTTagCompound();
|
||||
|
||||
MoneyBagContents contents = new MoneyBagContents(par3EntityPlayer);
|
||||
|
||||
NoppesUtil.openGUI(par3EntityPlayer, new GuiScreen());
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user