Posted May 24, 20169 yr I am tring to make it where if an item has a certain NBT tag and is not in the players hand, then delete it. Currently every tick I am iterating though all the items in the players inventory and checking if they have the NBT tag and is not in the main hand. Is there a better way to do this?
May 24, 20169 yr Author I am tring to make it where if an item has a certain NBT tag and is not in the players hand, then delete it. Currently every tick I am iterating though all the items in the players inventory and checking if they have the NBT tag and is not in the main hand. Is there a better way to do this?
May 24, 20169 yr onUpdate() is called whenever item is in inventory. Do that there. Are you also asking about removing item from world/other inventories (like mobs or chests)? 1.7.10 is no longer supported by forge, you are on your own.
May 24, 20169 yr onUpdate() is called whenever item is in inventory. Do that there. Are you also asking about removing item from world/other inventories (like mobs or chests)? 1.7.10 is no longer supported by forge, you are on your own.
May 24, 20169 yr Then PlayerTickEvent and iteration. 1.7.10 is no longer supported by forge, you are on your own.
May 24, 20169 yr Then PlayerTickEvent and iteration. 1.7.10 is no longer supported by forge, you are on your own.
May 24, 20169 yr Author Ok so what I'm doing is fine. I just thought there might be a more efficient way.
May 24, 20169 yr Author Ok so what I'm doing is fine. I just thought there might be a more efficient way.
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.