Expand description
Item behavior trait and registry.
Structsยง
- Item
Behavior Registry - Registry for item behaviors.
Enumsยง
- Item
UseAnimation - Arm animation displayed while using an item.
Traitsยง
- Item
Behavior - Trait defining the behavior of an item.
Functionsยง
- apply_
use_ ๐remainder - Applies vanilla
UseRemainder.convertIntoRemainder: if the original stack had ause_remainderand was actually consumed, either swap the fully emptied stack for the remainder, or โ for a stack that still has items left (e.g. one honey bottle out of several) - emit_
consume_ ๐particles_ and_ sounds - Mirrors vanilla
Consumable.emitParticlesAndSounds - finish_
consuming_ ๐stack - Applies vanilla
Consumable.onConsumeโs shared tail: runson_consume_effects, plays the consume sound, then shrinks the stack by one (creative mode leaves it untouched). - should_
emit_ ๐consume_ particles_ and_ sounds