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 Type
    Method
    Description
    double
    Retrieves the currently active gravity multiplier for the entity.
    void
    Assigns the multiplier applied to the entity's base gravity acceleration in Entity#getGravity().
  • Method Details

    • enchantment_core$setGravityMultiplier

      void enchantment_core$setGravityMultiplier(double multiplier)
      Assigns the multiplier applied to the entity's base gravity acceleration in Entity#getGravity().
      Parameters:
      multiplier - The gravity multiplier factor (where 1.0 represents 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.0 if unmodified).