Posted January 27, 201312 yr Hello together. I have the following question: How do I use itemInteractionForEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving)? There were two arguments: Objects of ItemStack and EntitiyLiving. Now I want to get a certain item, if I click on an animal. This looks like this: @Override public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving) { if (this.isFull == 0 && par2EntityLiving instanceof EntityOcelot { par1ItemStack = new ItemStack(Tutorial.FishBone); } return true; } But obviously the item won't change. I've already tried with itemID, itemID+256, itemID-256, but all these didn't work. What do I have to improve? And what is the return-value standing for?
January 28, 201312 yr par1ItemStack.Id = somethingElse +256; Also, is this.isFull just a standard Boolean, because that would cause multiplayer issues "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
January 28, 201312 yr Author Thanks so far, but I can't use par1ItemStack.Id. Id is simply not available. And sorry, if I was unprecise: This is the right code: without this.isFull (this.isFull was copied from a bucket and this.isFull means the bucket's content): @Override public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving) { if (par2EntityLiving instanceof EntityOcelot { par1ItemStack.itemID =Tutorial.itemID+256; } return true; } But anyway: How do I solve this problem now? And what does the return-value mean?
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.