Class GravityMixin

java.lang.Object
johnsmith.enchantmentcore.mixin.enchantment.effect.entity.GravityMixin
All Implemented Interfaces:
EntityStateAccessor

public abstract class GravityMixin extends Object implements 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 Details

    • GravityMixin

      public GravityMixin()
  • Method Details

    • enchantment_core$setGravityMultiplier

      public void enchantment_core$setGravityMultiplier(double multiplier)
      Description copied from interface: EntityStateAccessor
      Assigns the multiplier applied to the entity's base gravity acceleration in Entity#getGravity().
      Specified by:
      enchantment_core$setGravityMultiplier in interface EntityStateAccessor
      Parameters:
      multiplier - The gravity multiplier factor (where 1.0 represents unmodified vanilla gravity).
    • enchantment_core$getGravityMultiplier

      public double enchantment_core$getGravityMultiplier()
      Description copied from interface: EntityStateAccessor
      Retrieves the currently active gravity multiplier for the entity.
      Specified by:
      enchantment_core$getGravityMultiplier in interface EntityStateAccessor
      Returns:
      The gravity multiplier factor (defaults to 1.0 if unmodified).