IItemUpdate
The IItemUpdateFunction can be added to an Item to allow code to be executed whenever the item updates.
Importing the package
If you ever feel the need to import this function’s class, here you go:
Syntax
We have a void function that takes the following parameters (in order)
- An IMutableItemStack representing the item stack itself.
- An IWorld object representing the world the action takes place in.
- An IEntity object downcast as far as possible, so you can instanceOf up until ICTPlayer.
- An int representing the slot the item currently is in
- A boolean stating whether or not the item is currently selected.