Class RotationShape

java.lang.Object
org.moddingx.libx.block.RotationShape
Direct Known Subclasses:
DirectionShape

public class RotationShape extends Object
Holds 4 different VoxelShapes, one for each horizontal facing. Those are all created by rotating one original VoxelShape.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.world.phys.shapes.VoxelShape
     
    protected final net.minecraft.world.phys.shapes.VoxelShape
     
    protected final net.minecraft.world.phys.shapes.VoxelShape
     
    protected final net.minecraft.world.phys.shapes.VoxelShape
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    RotationShape(net.minecraft.world.phys.shapes.VoxelShape baseShape)
    Creates a new RotationShape with the given base shape.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.shapes.VoxelShape
    getShape(net.minecraft.core.Direction direction)
    Gets the VoxelShape for the given direction.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • north

      protected final net.minecraft.world.phys.shapes.VoxelShape north
    • south

      protected final net.minecraft.world.phys.shapes.VoxelShape south
    • east

      protected final net.minecraft.world.phys.shapes.VoxelShape east
    • west

      protected final net.minecraft.world.phys.shapes.VoxelShape west
  • Constructor Details

    • RotationShape

      public RotationShape(net.minecraft.world.phys.shapes.VoxelShape baseShape)
      Creates a new RotationShape with the given base shape. The base shape should be the shape facing north.
  • Method Details

    • getShape

      public net.minecraft.world.phys.shapes.VoxelShape getShape(net.minecraft.core.Direction direction)
      Gets the VoxelShape for the given direction. If the direction is not a horizontal direction the base shape is returned.