Class GravityMixin
java.lang.Object
johnsmith.enchantmentcore.mixin.enchantment.effect.entity.GravityMixin
- All Implemented Interfaces:
EntityStateAccessor
Mixin targeting the base Entity class to intercept gravity calculations.
Checks for the presence of the ProjectileStateAccessor interface to dynamically scale gravity forces.
-
Constructor Summary
Constructors -
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().
-
Constructor Details
-
GravityMixin
public GravityMixin()
-
-
Method Details
-
enchantment_core$setGravityMultiplier
public void enchantment_core$setGravityMultiplier(double multiplier) Description copied from interface:EntityStateAccessorAssigns the multiplier applied to the entity's base gravity acceleration inEntity#getGravity().- Specified by:
enchantment_core$setGravityMultiplierin interfaceEntityStateAccessor- Parameters:
multiplier- The gravity multiplier factor (where1.0represents unmodified vanilla gravity).
-
enchantment_core$getGravityMultiplier
public double enchantment_core$getGravityMultiplier()Description copied from interface:EntityStateAccessorRetrieves the currently active gravity multiplier for the entity.- Specified by:
enchantment_core$getGravityMultiplierin interfaceEntityStateAccessor- Returns:
- The gravity multiplier factor (defaults to
1.0if unmodified).
-