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 dcu
  • 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 Ldcu;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 Ldcu;a(Lja;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 Ldcu;b(Lja;D)D