Interface GravityFunction

All Known Subinterfaces:
SerializableGravityFunction<T>
All Known Implementing Classes:
AbsoluteGravityFunction, InterpolatedGravityFunction
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GravityFunction
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(@Nullable net.minecraft.world.entity.Entity entity, double y, double minY, double maxY)
     
  • Method Details

    • get

      double get(@Nullable @Nullable net.minecraft.world.entity.Entity entity, double y, double minY, double maxY)
      Parameters:
      entity - The optional entity being tracked
      y - The current y position
      minY - The minimum Y position of the gravity belt
      maxY - The maximum Y position of the gravity belt
      Returns:
      The gravity value