MinecraftForge/MinecraftForge — pull request #1040 by copygirl (2014-04-14 03:54:32+00:00)
Title: Add onPlayerTick to Item class

This includes the changes from my other PR (#1039) because it's more likely to be accepted, and sooner, not to mention I made them for the same reason. I thought it'd make sense to do it this way, so I wouldn't have to update this one in case the other one gets accepted.

Either way, this is more of a suggestion than a request. I'm wondering if this would be a good idea and if anyone had any ideas to improve this. It's meant for a general-purpose tick method for items, expandable to mods. Additional equipment slots could be supported. Mods that allow holding multiple items at once, or increase hotbar / inventory size. Bags and backpacks could have items update inside of them.

I have absolutely no idea if the EnumStackLocation is "good" at all. A string might do it. Classes with inheritance and methods to set the stack to something completely different might be nice. Adjusting damage / NBT already works, setting the item to null (or stack size to 0) would not.