Class GravityField

java.lang.Object
net.minecraft.util.math.GravityField

public class GravityField extends Object
Represents a density field in an area. Consider visualizing it like real life gravity's distortion of space.
Mappings:
Namespace Name
named net/minecraft/util/math/GravityField
intermediary net/minecraft/class_5263
official dhv
  • Field Details

    • points

      private final List<GravityField.Point> points
      Mappings:
      Namespace Name Mixin selector
      named points Lnet/minecraft/util/math/GravityField;points:Ljava/util/List;
      intermediary field_24401 Lnet/minecraft/class_5263;field_24401:Ljava/util/List;
      official a Ldhv;a:Ljava/util/List;
  • Constructor Details

    • GravityField

      public GravityField()
  • Method Details

    • addPoint

      public void addPoint(BlockPos pos, double mass)
      Adds a point to the gravity field.
      Mappings:
      Namespace Name Mixin selector
      named addPoint Lnet/minecraft/util/math/GravityField;addPoint(Lnet/minecraft/util/math/BlockPos;D)V
      intermediary method_27831 Lnet/minecraft/class_5263;method_27831(Lnet/minecraft/class_2338;D)V
      official a Ldhv;a(Ljh;D)V
    • calculate

      public double calculate(BlockPos pos, double mass)
      Calculate the gravity on a potential point at pos with mass.
      Mappings:
      Namespace Name Mixin selector
      named calculate Lnet/minecraft/util/math/GravityField;calculate(Lnet/minecraft/util/math/BlockPos;D)D
      intermediary method_27832 Lnet/minecraft/class_5263;method_27832(Lnet/minecraft/class_2338;D)D
      official b Ldhv;b(Ljh;D)D