Adds custom modification to the item tooltip. It is better than InnerCore's Item.registerNameOverrideFunction, because exactly the hover text and not the item name is being modified.
numeric ID of the item to apply this callback to, vanilla supported
function that takes tooltip represented by the list of strings, which you can modify in any way, as the second parameter, and also item instance as the first parameter and Level object as the third
callback priority, the more it is, the earlier than other callbacks your callback will be called, default is 0
default is true, you can set it to false, if your tooltip doesn't have any volatile components, then your tooltip will be called 4 times less often than the ones with this param set to true, which will reduce a tiny performance loss.
object containing food properties of the item with given ID, or null if the item is not a food
true if the item with given ID is a food, false otherwise
Registers new string food saturation modifier that can be used in food properties JSON object. Currently there are 6 pre-defined modifiers in vanilla:
"poor"
- 0.2"low"
- 0.6"normal"
- 1.2"good"
- 1.6"max"
- 2.0"supernatural"
- 2.4Sets the given ReachDistanceModifier object to be enabled when the player is holding the item with given ID in their hand.
numeric ID of the item to apply the modifier to, vanilla supported
floating point value of food saturation modifier by given name,
or 1.2 (value of "normal"
modifier) if the modifier by this name is not defined
Calling this method prevents the item with given ID to be repaired in anvil using any material or these items paired. This can be used, for example, with electric tools.
numeric ID of the item to apply this property to, vanilla NOT supported
Sets dynamic food properties for the item with given ID, depending on the contents of the item instance.
numeric ID of the item to apply this callback to, vanilla supported
function that takes the item instance and must return the food properties object builder with all needed properties specified for it
If this property is set to true, the item with given ID will be immune to any type of explosion. The only vanilla item with this property set to true is nether star. By default it's false.
numeric ID of the item to apply this property to, vanilla supported
If this property is set to true, the item with given ID will be immune to fire and lava. Talking about the vanilla items, the only items having this property set to true are netherite ingot, tools and armor. By default it's false.
numeric ID of the item to apply this property to, vanilla supported
Sets the amount of items that can be smelt with a single item of given ID as a fuel.
numeric ID of the item to apply this property to, vanilla supported
Sets the multiplier that will be used in calculating the amount of experience to add to a player (or to drop from a broken furnace) after smelting the item with given ID (the method must be applied to the result and not to the ingredient). Default value is 0.0, cooked meat has 0.35, golden ingot has 1.0 (1.0 = 100% chance of dropping any XP)
numeric ID of the item to apply this property to, vanilla supported
If this property is set to true, the icon of the item with given ID will be horizontally mirrored in container slots. By default it's false. Some of the vanilla items with this property set to true are fishing rod and carrot on a stick.
numeric ID of the item to apply this property to, vanilla supported
Sets dynamic maximum use duration for the item with given ID, depending on the contents of the item instance.
numeric ID of the item to apply this callback to, vanilla NOT supported
function that takes the item instance and must return max use duration value for it
If this property is set to true, the item with given ID won't be usable in adventure mode, by default it's false.
numeric ID of the item to apply this property to, vanilla supported
If this property is set to true, the item with given ID will not despawn in a certain period of time after it was dropped on the ground and not picked up by anyone. There are no vanilla items with this property set to false, by default it's true.
numeric ID of the item to apply this property to, vanilla supported
Generated using TypeDoc
A module that adds bunch of new features that can be applied to vanilla or custom items. Remember that not all the methods support vanilla items, because of some technical peculiarities.
1.0