Class VoxelShape

java.lang.Object
net.minecraft.world.phys.shapes.VoxelShape
Direct Known Subclasses:
ArrayVoxelShape, CubeVoxelShape, SliceShape

public abstract class VoxelShape extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • min

      public double min(Direction.Axis pAxis)
    • max

      public double max(Direction.Axis pAxis)
    • bounds

      public AABB bounds()
    • singleEncompassing

      public VoxelShape singleEncompassing()
    • get

      protected double get(Direction.Axis pAxis, int pIndex)
    • getCoords

      public abstract it.unimi.dsi.fastutil.doubles.DoubleList getCoords(Direction.Axis p_83249_)
    • isEmpty

      public boolean isEmpty()
    • move

      public VoxelShape move(double pXOffset, double pYOffset, double pZOffset)
    • optimize

      public VoxelShape optimize()
    • forAllEdges

      public void forAllEdges(Shapes.DoubleLineConsumer pAction)
    • forAllBoxes

      public void forAllBoxes(Shapes.DoubleLineConsumer pAction)
    • toAabbs

      public List<AABB> toAabbs()
    • min

      public double min(Direction.Axis pAxis, double pPrimaryPosition, double pSecondaryPosition)
    • max

      public double max(Direction.Axis pAxis, double pPrimaryPosition, double pSecondaryPosition)
    • findIndex

      protected int findIndex(Direction.Axis pAxis, double pPosition)
    • clip

      @Nullable public BlockHitResult clip(Vec3 pStartVec, Vec3 pEndVec, BlockPos pPos)
    • closestPointTo

      public Optional<Vec3> closestPointTo(Vec3 pPoint)
    • getFaceShape

      public VoxelShape getFaceShape(Direction pSide)
      Projects this shape onto the given side. For each box in the shape, if it does not touch the given side, it is eliminated. Otherwise, the box is extended in the given axis to cover the entire range [0, 1].
    • calculateFace

      private VoxelShape calculateFace(Direction pSide)
    • collide

      public double collide(Direction.Axis pMovementAxis, AABB pCollisionBox, double pDesiredOffset)
    • collideX

      protected double collideX(AxisCycle pMovementAxis, AABB pCollisionBox, double pDesiredOffset)
    • toString

      public String toString()
      Overrides:
      toString in class Object