Skip to main content

Module potion_contents

Module potion_contents 

Source
Expand description

Vanilla PotionContents behavior extension: the methods that need LivingEntity/World, which canโ€™t live alongside the data in steel_registry::data_components::PotionContents.

Functionsยง

apply_potion_contents ๐Ÿ”’
Mirrors vanilla PotionContents.applyToLivingEntity(user, durationScale).
scale_effect_duration ๐Ÿ”’
Mirrors vanilla MobEffectInstance.withScaledDuration: scales duration by scale, leaving the infinite-duration sentinel (-1) and a zero duration untouched, and never rounding a finite result below 1 tick.
to_runtime_instance ๐Ÿ”’
Builds the runtime active-effect state for one registry mob-effect instance, ready to hand to LivingEntity::add_mob_effect.