Expand description
Consume-effect behaviors: one small module per vanilla ConsumeEffect
subtype under net/minecraft/world/item/consume_effects.
Modules§
- apply_
effects 🔒 ApplyStatusEffectsConsumeEffectbehavior (golden apple, poisonous potato, rotten flesh, etc.). Suspicious stew’s effect is a separate, unrelatedSuspiciousStewEffectsdata component, not this.- clear_
all_ 🔒effects ClearAllStatusEffectsConsumeEffectbehavior (e.g. milk bucket).- play_
sound 🔒 PlaySoundConsumeEffectbehavior (e.g. ominous bottle, viaConsumable .Builder.soundAfterConsume, sugar for this exact effect).- remove_
effects 🔒 RemoveStatusEffectsConsumeEffectbehavior (e.g. honey bottle removing Poison).- teleport_
randomly 🔒 TeleportRandomlyConsumeEffectbehavior (chorus fruit).
Structs§
- Apply
Effects Behavior - Mirrors vanilla
ApplyStatusEffectsConsumeEffect.apply: unlike drinking a potion, this always goes throughLivingEntity.addEffect - Clear
AllEffects Behavior - Mirrors vanilla
ClearAllStatusEffectsConsumeEffect.apply. Carries no fields, so there is nothing to downcast for. - Play
Sound Behavior - Mirrors vanilla
PlaySoundConsumeEffect.apply. - Remove
Effects Behavior - Mirrors vanilla
RemoveStatusEffectsConsumeEffect.apply. - Teleport
Randomly Behavior - Mirrors vanilla
TeleportRandomlyConsumeEffect.apply.
Traits§
- Consume
Effect Behavior - Mirrors vanilla’s
ConsumeEffect.apply(Level, ItemStack, LivingEntity)
Functions§
- apply_
consume_ 🔒effect - Applies one
ConsumeEffectDataentry from aConsumable.on_consume_effectslist, by looking up its registered behavior.