Interface EntityStateAccessor
- All Known Subinterfaces:
ProjectileStateAccessor
- All Known Implementing Classes:
GravityMixin, StateDeclarationMixin
public interface EntityStateAccessor
Duck interface injected into
Entity via GravityMixin
to store and query dynamic per-entity physics modifiers such as gravity scaling.-
Method Summary
Modifier and TypeMethodDescriptiondoubleRetrieves the currently active gravity multiplier for the entity.voidenchantment_core$setGravityMultiplier(double multiplier) Assigns the multiplier applied to the entity's base gravity acceleration inEntity#getGravity().
-
Method Details
-
enchantment_core$setGravityMultiplier
void enchantment_core$setGravityMultiplier(double multiplier) Assigns the multiplier applied to the entity's base gravity acceleration inEntity#getGravity().- Parameters:
multiplier- The gravity multiplier factor (where1.0represents unmodified vanilla gravity).
-
enchantment_core$getGravityMultiplier
double enchantment_core$getGravityMultiplier()Retrieves the currently active gravity multiplier for the entity.- Returns:
- The gravity multiplier factor (defaults to
1.0if unmodified).
-