Class Rotator
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRotator()init the ShapeRotationRotator(int yRotation, int zRotation, int secondYRotation) init the ShapeRotationRotator(net.minecraft.core.BlockPos centerPos) constructor of the objectRotator(net.minecraft.core.BlockPos centerPos, int yRotation) constructor of the objectRotator(net.minecraft.core.BlockPos centerPos, int yRotation, int zRotation) constructor of the objectRotator(net.minecraft.core.BlockPos centerPos, int yRotation, int zRotation, int secondYRotation) constructor of the object -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSecondZRotation(int secondYRotation) voidaddYRotation(int yRotation) voidaddZRotation(int YRotation) longget(double x, double y, double z) longget(long pos) it.unimi.dsi.fastutil.longs.LongArrayListgetAll(it.unimi.dsi.fastutil.longs.LongArrayList pos) net.minecraft.core.BlockPosgetBlockPos(double[] pos) net.minecraft.core.BlockPosgetBlockPos(double x, double y, double z) method to get the rotation depending on the different rotations determined beforenet.minecraft.core.BlockPosgetBlockPos(int[] pos) net.minecraft.core.BlockPosgetBlockPos(net.minecraft.core.BlockPos pos) net.minecraft.core.BlockPosgetBlockPos(net.minecraft.world.phys.Vec3 pos) method to get the rotation of Vec3d depending on the different rotations determined beforenet.minecraft.core.BlockPoslonggetRaw(double x, double y, double z) longgetRaw(long pos) net.minecraft.core.BlockPosgetRawBlockPos(float x, float y, float z) method to get the rotation without taking account of the center posintintintsetCenterPos(net.minecraft.core.BlockPos centerPos) voidsetSecondYRotation(int secondYRotation) voidsetYRotation(int yRotation) voidsetZRotation(int yRotation)
-
Field Details
-
CODEC
-
-
Constructor Details
-
Rotator
public Rotator(net.minecraft.core.BlockPos centerPos, int yRotation, int zRotation, int secondYRotation) constructor of the object- Parameters:
centerPos- theBlockPoson 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,0yRotation- the rotations of the object.This is the first rotation applied.
The parameter will make the
BlockPosrotate around the y-axiszRotation- the rotations of the object.This is the second rotation applied.
The parameter will make the
BlockPosrotate around the z-axissecondYRotation- the rotations of the object.This is the third rotation applied.
The parameter will make the
BlockPosrotate 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
BlockPosrotate around the y-axiszRotation- the rotations of the object.This is the second rotation applied.
The parameter will make the
BlockPosrotate around the z-axissecondYRotation- the rotations of the object.This is the third rotation applied.
The parameter will make the
BlockPosrotate around the y-axis
-
Rotator
public Rotator(net.minecraft.core.BlockPos centerPos, int yRotation, int zRotation) constructor of the object- Parameters:
centerPos- theBlockPoson 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,0yRotation- the rotations of the object.This is the first rotation applied.
The parameter will make the
BlockPosrotate around the y-axiszRotation- the rotations of the object.This is the second rotation applied.
The parameter will make the
BlockPosrotate around the z-axis
-
Rotator
public Rotator(net.minecraft.core.BlockPos centerPos, int yRotation) constructor of the object- Parameters:
centerPos- theBlockPoson 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,0yRotation- the rotations of the object.This is the first rotation applied.
The parameter will make the
BlockPosrotate around the y-axis
-
Rotator
public Rotator(net.minecraft.core.BlockPos centerPos) constructor of the object- Parameters:
centerPos- theBlockPoson 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.core.BlockPos getCenterPos() -
setCenterPos
-
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.core.BlockPos getBlockPos(int[] pos) -
getBlockPos
public net.minecraft.core.BlockPos getBlockPos(double[] pos) -
getBlockPos
public net.minecraft.core.BlockPos getBlockPos(net.minecraft.core.BlockPos pos) -
getBlockPos
public net.minecraft.core.BlockPos getBlockPos(net.minecraft.world.phys.Vec3 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.core.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 BlockPosy- the distance on the y-axis from the BlockPosz- the distance on the z-axis from the BlockPos- Returns:
- the BlockPos related to the rotation
-
getRawBlockPos
public net.minecraft.core.BlockPos getRawBlockPos(float x, float y, float z) method to get the rotation without taking account of the center pos
-