Class StructureTransform

java.lang.Object
com.simibubi.create.content.contraptions.StructureTransform

public class StructureTransform extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    int
     
    net.minecraft.world.level.block.Mirror
     
    net.minecraft.core.BlockPos
     
    net.minecraft.world.level.block.Rotation
     
    net.minecraft.core.Direction.Axis
     
    static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,StructureTransform>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StructureTransform(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 Type
    Method
    Description
    net.minecraft.core.BlockPos
    apply(net.minecraft.core.BlockPos localPos)
     
    void
    apply(net.minecraft.world.level.block.entity.BlockEntity be)
     
    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.
    net.minecraft.world.phys.Vec3
    apply(net.minecraft.world.phys.Vec3 localVec)
     
    net.minecraft.core.BlockPos
    applyWithoutOffset(net.minecraft.core.BlockPos localPos)
     
    net.minecraft.world.phys.Vec3
    applyWithoutOffset(net.minecraft.world.phys.Vec3 localVec)
     
    net.minecraft.world.phys.Vec3
    applyWithoutOffsetUncentered(net.minecraft.world.phys.Vec3 localVec)
     
    net.minecraft.core.Direction
    mirrorFacing(net.minecraft.core.Direction facing)
     
    net.minecraft.core.Direction.Axis
    rotateAxis(net.minecraft.core.Direction.Axis axis)
     
    net.minecraft.core.Direction
    rotateFacing(net.minecraft.core.Direction facing)
     
    protected net.minecraft.world.level.block.state.BlockState
    transformStairs(net.minecraft.world.level.block.state.BlockState state, boolean halfTurn)
     
    net.minecraft.core.BlockPos
    unapply(net.minecraft.core.BlockPos globalPos)
     
    net.minecraft.core.BlockPos
    unapplyWithoutOffset(net.minecraft.core.BlockPos globalPos)
     
    net.minecraft.world.phys.Vec3
    unapplyWithoutOffset(net.minecraft.world.phys.Vec3 globalVec)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)