java.lang.Object
net.rodofire.easierworldcreator.shape.block.rotations.Rotator

public class Rotator extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    init the ShapeRotation
    Rotator(int yRotation, int zRotation, int secondYRotation)
    init the ShapeRotation
    Rotator(net.minecraft.util.math.BlockPos centerPos)
    constructor of the object
    Rotator(net.minecraft.util.math.BlockPos centerPos, int yRotation)
    constructor of the object
    Rotator(net.minecraft.util.math.BlockPos centerPos, int yRotation, int zRotation)
    constructor of the object
    Rotator(net.minecraft.util.math.BlockPos centerPos, int yRotation, int zRotation, int secondYRotation)
    constructor of the object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSecondZRotation(int secondYRotation)
     
    void
    addYRotation(int yRotation)
     
    void
    addZRotation(int YRotation)
     
    long
    get(double x, double y, double z)
     
    long
    get(long pos)
     
    it.unimi.dsi.fastutil.longs.LongArrayList
    getAll(it.unimi.dsi.fastutil.longs.LongArrayList pos)
     
    net.minecraft.util.math.BlockPos
    getBlockPos(double[] pos)
     
    net.minecraft.util.math.BlockPos
    getBlockPos(double x, double y, double z)
    method to get the rotation depending on the different rotations determined before
    net.minecraft.util.math.BlockPos
    getBlockPos(int[] pos)
     
    net.minecraft.util.math.BlockPos
    getBlockPos(net.minecraft.util.math.BlockPos pos)
     
    net.minecraft.util.math.BlockPos
    getBlockPos(net.minecraft.util.math.Vec3d pos)
    method to get the rotation of Vec3d depending on the different rotations determined before
    net.minecraft.util.math.BlockPos
     
    long
    getRaw(double x, double y, double z)
     
    long
    getRaw(long pos)
     
    net.minecraft.util.math.BlockPos
    getRawBlockPos(float x, float y, float z)
    method to get the rotation without taking account of the center pos
    int
     
    int
     
    int
     
    setCenterPos(net.minecraft.util.math.BlockPos centerPos)
     
    void
    setSecondYRotation(int secondYRotation)
     
    void
    setYRotation(int yRotation)
     
    void
    setZRotation(int yRotation)
     

    Methods inherited from class java.lang.Object

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

    • Rotator

      public Rotator(net.minecraft.util.math.BlockPos centerPos, int yRotation, int zRotation, int secondYRotation)
      constructor of the object
      Parameters:
      centerPos - the BlockPos on which the coordinates will rotates. This is an important parameter to define since that if it is not specified, the rotations will be done around the point 0,0,0
      yRotation - the rotations of the object.

      This is the first rotation applied.

      The parameter will make the BlockPos rotate around the y-axis

      zRotation - the rotations of the object.

      This is the second rotation applied.

      The parameter will make the BlockPos rotate around the z-axis

      secondYRotation - the rotations of the object.

      This is the third rotation applied.

      The parameter will make the BlockPos rotate around the y-axis

    • Rotator

      public Rotator(int yRotation, int zRotation, int secondYRotation)
      init the ShapeRotation
      Parameters:
      yRotation - the rotations of the object.

      This is the first rotation applied.

      The parameter will make the BlockPos rotate around the y-axis

      zRotation - the rotations of the object.

      This is the second rotation applied.

      The parameter will make the BlockPos rotate around the z-axis

      secondYRotation - the rotations of the object.

      This is the third rotation applied.

      The parameter will make the BlockPos rotate around the y-axis

    • Rotator

      public Rotator(net.minecraft.util.math.BlockPos centerPos, int yRotation, int zRotation)
      constructor of the object
      Parameters:
      centerPos - the BlockPos on which the coordinates will rotates. This is an important parameter to define since that if it is not specified, the rotations will be done around the point 0,0,0
      yRotation - the rotations of the object.

      This is the first rotation applied.

      The parameter will make the BlockPos rotate around the y-axis

      zRotation - the rotations of the object.

      This is the second rotation applied.

      The parameter will make the BlockPos rotate around the z-axis

    • Rotator

      public Rotator(net.minecraft.util.math.BlockPos centerPos, int yRotation)
      constructor of the object
      Parameters:
      centerPos - the BlockPos on which the coordinates will rotates. This is an important parameter to define since that if it is not specified, the rotations will be done around the point 0,0,0
      yRotation - the rotations of the object.

      This is the first rotation applied.

      The parameter will make the BlockPos rotate around the y-axis

    • Rotator

      public Rotator(net.minecraft.util.math.BlockPos centerPos)
      constructor of the object
      Parameters:
      centerPos - the BlockPos on which the coordinates will rotates. This is an important parameter to define since that if it is not specified, the rotations will be done around the point 0,0,0
    • Rotator

      public Rotator()
      init the ShapeRotation
  • 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)
    • getCenterPos

      public net.minecraft.util.math.BlockPos getCenterPos()
    • setCenterPos

      public Rotator setCenterPos(net.minecraft.util.math.BlockPos centerPos)
    • getAll

      public it.unimi.dsi.fastutil.longs.LongArrayList getAll(it.unimi.dsi.fastutil.longs.LongArrayList pos)
    • get

      public long get(long pos)
    • get

      public long get(double x, double y, double z)
    • getRaw

      public long getRaw(long pos)
    • getRaw

      public long getRaw(double x, double y, double z)
    • getBlockPos

      public net.minecraft.util.math.BlockPos getBlockPos(int[] pos)
    • getBlockPos

      public net.minecraft.util.math.BlockPos getBlockPos(double[] pos)
    • getBlockPos

      public net.minecraft.util.math.BlockPos getBlockPos(net.minecraft.util.math.BlockPos pos)
    • getBlockPos

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

      public net.minecraft.util.math.BlockPos getBlockPos(double x, double y, double z)
      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
      Returns:
      the BlockPos related to the rotation
    • getRawBlockPos

      public net.minecraft.util.math.BlockPos getRawBlockPos(float x, float y, float z)
      method to get the rotation without taking account of the center pos