Class ShapeRotation

Direct Known Subclasses:
Shape

public abstract class ShapeRotation extends ShapeLayer
  • Constructor Details

    • ShapeRotation

      public ShapeRotation(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.PlaceMoment placeMoment, ShapePlaceType.LayerPlace layerPlace, ShapeLayer.LayersType layersType, int yRotation, int zRotation, int secondYRotation)
      init the ShapeRotation
      Parameters:
      world - the world the spiral will spawn in
      pos - the center of the spiral
      placeMoment - define the moment where the shape will be placed
      layerPlace - how the @BlockStates inside of a BlockLayer will be placed
      layersType - how the Layers will be placed
      yRotation - first rotation around the y-axis
      zRotation - second rotation around the z-axis
      secondYRotation - last rotation around the y-axis
    • ShapeRotation

      public ShapeRotation(@NotNull @NotNull net.minecraft.world.StructureWorldAccess world, @NotNull @NotNull net.minecraft.util.math.BlockPos pos, @NotNull @NotNull ShapeBase.PlaceMoment placeMoment)
      init the ShapeRotation
      Parameters:
      world - the world of the shape
      pos - the pos of the shape (usually the center of the structure)
      placeMoment - define the moment where the shape will be placed
  • Method Details

    • setYRotation

      public void setYRotation(int yRotation)
    • getYRotation

      public int getYRotation()
    • getZRotation

      public int getZRotation()
    • setZRotation

      public void setZRotation(int yRotation)
    • getSecondYRotation

      public int getSecondYRotation()
    • setSecondYRotation

      public void setSecondYRotation(int secondYRotation)
    • addZRotation

      public void addZRotation(int YRotation)
    • addYRotation

      public void addYRotation(int yRotation)
    • addSecondZRotation

      public void addSecondZRotation(int secondYRotation)
    • getCoordinatesRotation

      public net.minecraft.util.math.BlockPos getCoordinatesRotation(net.minecraft.util.math.Vec3d pos, net.minecraft.util.math.BlockPos centerPos)
      method to get the rotation of Vec3d depending on the different rotations determined before
      Parameters:
      pos - BlockPos that has to be rotated
      centerPos - The center of the rotation
      Returns:
      a list of BlockPos related to the rotation
    • getCoordinatesRotation

      public net.minecraft.util.math.BlockPos getCoordinatesRotation(float x, float y, float z, net.minecraft.util.math.BlockPos centerPos)
      method to get the rotation depending on the different rotations determined before
      Parameters:
      x - the distance on the x-axis from the BlockPos
      y - the distance on the y-axis from the BlockPos
      z - the distance on the z-axis from the BlockPos
      centerPos - the center of the rotation
      Returns:
      the BlockPos related to the rotation
    • getCoordinatesRotationList

      public List<net.minecraft.util.math.BlockPos> getCoordinatesRotationList(List<net.minecraft.util.math.Vec3d> posList, net.minecraft.util.math.BlockPos centerPos)
      method to get the rotation of a list depending on the different rotations determined before
      Parameters:
      posList - the list of coordinates that has to be rotated
      centerPos - The center of the rotation
      Returns:
      a list of BlockPos related to the rotation