Class StructureTransform
java.lang.Object
com.simibubi.create.content.contraptions.StructureTransform
-
Field Summary
FieldsModifier and TypeFieldDescriptionintnet.minecraft.world.level.block.Mirrornet.minecraft.core.BlockPosnet.minecraft.world.level.block.Rotationnet.minecraft.core.Direction.Axisstatic final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, StructureTransform> -
Constructor Summary
ConstructorsConstructorDescriptionStructureTransform(net.minecraft.core.BlockPos offset, float xRotation, float yRotation, float zRotation) StructureTransform(net.minecraft.core.BlockPos offset, net.minecraft.core.Direction.Axis axis, net.minecraft.world.level.block.Rotation rotation, net.minecraft.world.level.block.Mirror mirror) -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.core.BlockPosapply(net.minecraft.core.BlockPos localPos) voidapply(net.minecraft.world.level.block.entity.BlockEntity be) net.minecraft.world.level.block.state.BlockStateapply(net.minecraft.world.level.block.state.BlockState state) Vanilla does not support block state rotation around axes other than Y.net.minecraft.world.phys.Vec3apply(net.minecraft.world.phys.Vec3 localVec) net.minecraft.core.BlockPosapplyWithoutOffset(net.minecraft.core.BlockPos localPos) net.minecraft.world.phys.Vec3applyWithoutOffset(net.minecraft.world.phys.Vec3 localVec) net.minecraft.world.phys.Vec3applyWithoutOffsetUncentered(net.minecraft.world.phys.Vec3 localVec) net.minecraft.core.DirectionmirrorFacing(net.minecraft.core.Direction facing) net.minecraft.core.Direction.AxisrotateAxis(net.minecraft.core.Direction.Axis axis) net.minecraft.core.DirectionrotateFacing(net.minecraft.core.Direction facing) protected net.minecraft.world.level.block.state.BlockStatetransformStairs(net.minecraft.world.level.block.state.BlockState state, boolean halfTurn) net.minecraft.core.BlockPosunapply(net.minecraft.core.BlockPos globalPos) net.minecraft.core.BlockPosunapplyWithoutOffset(net.minecraft.core.BlockPos globalPos) net.minecraft.world.phys.Vec3unapplyWithoutOffset(net.minecraft.world.phys.Vec3 globalVec)
-
Field Details
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,StructureTransform> STREAM_CODEC -
rotationAxis
public net.minecraft.core.Direction.Axis rotationAxis -
offset
public net.minecraft.core.BlockPos offset -
angle
public int angle -
rotation
public net.minecraft.world.level.block.Rotation rotation -
mirror
public net.minecraft.world.level.block.Mirror mirror
-
-
Constructor Details
-
StructureTransform
public StructureTransform(net.minecraft.core.BlockPos offset, net.minecraft.core.Direction.Axis axis, net.minecraft.world.level.block.Rotation rotation, net.minecraft.world.level.block.Mirror mirror) -
StructureTransform
public StructureTransform(net.minecraft.core.BlockPos offset, float xRotation, float yRotation, float zRotation)
-
-
Method Details
-
applyWithoutOffsetUncentered
public net.minecraft.world.phys.Vec3 applyWithoutOffsetUncentered(net.minecraft.world.phys.Vec3 localVec) -
applyWithoutOffset
public net.minecraft.world.phys.Vec3 applyWithoutOffset(net.minecraft.world.phys.Vec3 localVec) -
unapplyWithoutOffset
public net.minecraft.world.phys.Vec3 unapplyWithoutOffset(net.minecraft.world.phys.Vec3 globalVec) -
apply
public net.minecraft.world.phys.Vec3 apply(net.minecraft.world.phys.Vec3 localVec) -
applyWithoutOffset
public net.minecraft.core.BlockPos applyWithoutOffset(net.minecraft.core.BlockPos localPos) -
apply
public net.minecraft.core.BlockPos apply(net.minecraft.core.BlockPos localPos) -
unapply
public net.minecraft.core.BlockPos unapply(net.minecraft.core.BlockPos globalPos) -
unapplyWithoutOffset
public net.minecraft.core.BlockPos unapplyWithoutOffset(net.minecraft.core.BlockPos globalPos) -
apply
public void apply(net.minecraft.world.level.block.entity.BlockEntity be) -
apply
public net.minecraft.world.level.block.state.BlockState apply(net.minecraft.world.level.block.state.BlockState state) Vanilla does not support block state rotation around axes other than Y. Add specific cases here for vanilla block states so that they can react to rotations around horizontal axes. For Create blocks, implement ITransformableBlock. -
transformStairs
protected net.minecraft.world.level.block.state.BlockState transformStairs(net.minecraft.world.level.block.state.BlockState state, boolean halfTurn) -
mirrorFacing
public net.minecraft.core.Direction mirrorFacing(net.minecraft.core.Direction facing) -
rotateAxis
public net.minecraft.core.Direction.Axis rotateAxis(net.minecraft.core.Direction.Axis axis) -
rotateFacing
public net.minecraft.core.Direction rotateFacing(net.minecraft.core.Direction facing)
-