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
official cak
intermediary net/minecraft/class_5263
named net/minecraft/util/math/GravityField
  • Field Details

    • points

      private final List<GravityField.Point> points
      Mappings:
      Namespace Name Mixin selector
      official a Lcak;a:Ljava/util/List;
      intermediary field_24401 Lnet/minecraft/class_5263;field_24401:Ljava/util/List;
      named points Lnet/minecraft/util/math/GravityField;points: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
      official a Lcak;a(Lgh;D)V
      intermediary method_27831 Lnet/minecraft/class_5263;method_27831(Lnet/minecraft/class_2338;D)V
      named addPoint Lnet/minecraft/util/math/GravityField;addPoint(Lnet/minecraft/util/math/BlockPos;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
      official b Lcak;b(Lgh;D)D
      intermediary method_27832 Lnet/minecraft/class_5263;method_27832(Lnet/minecraft/class_2338;D)D
      named calculate Lnet/minecraft/util/math/GravityField;calculate(Lnet/minecraft/util/math/BlockPos;D)D