Posted February 25, 201312 yr I wonder how does ItemStack's calling function works. if two ItemStacks were used and called theirs' item's onItemRightClick() function,etc are they calling the exactly same instance of the item? if I made an Item like this: public class WeaponWhatever extends Item { public Boolean isUsed; public WeaponWhatever(int par1ID) { super(par1ID); setItemName("Whateveer it is"); setTextureFile(ClientProxy.ITEMS_TEXTURE_PATH); setIconCoord(0,0); isUsed = false; } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if(!isUsed)System.out.println("Item hasn't been yet used." ); else System.out.println("Item has been used. "); isUsed = true; return par1ItemStack; } } if I put two of the Item in my inventory,and I right click the first one when I right click the second one,will the result be "Item has been used"? If so , how can I do to make ItemStacks use seperate same processing func with different local variables? Thanks a lot
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.