Enum Class RotationMirror

java.lang.Object
java.lang.Enum<RotationMirror>
com.ldtteam.structurize.api.RotationMirror
All Implemented Interfaces:
Serializable, Comparable<RotationMirror>, Constable

public enum RotationMirror extends Enum<RotationMirror>
Represents all possible states of structure when rorating or mirroring
  • Enum Constant Details

  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<RotationMirror> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,RotationMirror> STREAM_CODEC
    • MIRRORED

      public static final RotationMirror[] MIRRORED
    • NOT_MIRRORED

      public static final RotationMirror[] NOT_MIRRORED
  • Method Details

    • values

      public static RotationMirror[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static RotationMirror valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • rotation

      public net.minecraft.world.level.block.Rotation rotation()
    • isMirrored

      public boolean isMirrored()
    • mirror

      public net.minecraft.world.level.block.Mirror mirror()
    • rotate

      public RotationMirror rotate(net.minecraft.world.level.block.Rotation offset)
    • mirrorate

      public RotationMirror mirrorate()
    • mirrorate

      public RotationMirror mirrorate(net.minecraft.world.level.block.Mirror mirrorIn)
      See Also:
    • of

      public static RotationMirror of(net.minecraft.world.level.block.Rotation rotation, net.minecraft.world.level.block.Mirror mirror)
    • applyToPos

      public net.minecraft.core.BlockPos applyToPos(net.minecraft.core.BlockPos pos)
      Parameters:
      pos - position to transform
      Returns:
      transformed position using this rot+mir around zero pivot
    • applyToPos

      public net.minecraft.core.BlockPos applyToPos(net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos pivot)
      Parameters:
      pos - position to transform
      pivot - center of transformation
      Returns:
      transformed position using this rot+mir around given pivot
    • applyToPos

      public net.minecraft.world.phys.Vec3 applyToPos(net.minecraft.world.phys.Vec3 pos)
      Parameters:
      pos - position to transform
      Returns:
      transformed position using this rot+mir around zero pivot
    • applyToPos

      public net.minecraft.world.phys.Vec3 applyToPos(net.minecraft.world.phys.Vec3 pos, net.minecraft.core.BlockPos pivot)
      Parameters:
      pos - position to transform
      pivot - center of transformation
      Returns:
      transformed position using this rot+mir around given pivot
    • applyToBlockState

      @Deprecated public net.minecraft.world.level.block.state.BlockState applyToBlockState(net.minecraft.world.level.block.state.BlockState blockState)
      Deprecated.
      use applyToBlockState(BlockState, Level, BlockPos), see vanilla methods for more info
      Parameters:
      blockState - blockState to transform
      Returns:
      transformed blockState using this rot+mir
    • applyToBlockState

      public net.minecraft.world.level.block.state.BlockState applyToBlockState(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
      Parameters:
      blockState - blockState to transform
      level - in which given blockState lives
      pos - where the given blockState is in given level
      Returns:
      transformed blockState using this rot+mir
    • calcDifferenceTowards

      public RotationMirror calcDifferenceTowards(RotationMirror end)
      Parameters:
      end - in which state we should end
      Returns:
      end - this = what it takes from this to end
    • add

      public RotationMirror add(RotationMirror other)
      See Also: