Package com.ldtteam.structurize.api
Enum Class RotationMirror
- All Implemented Interfaces:
Serializable,Comparable<RotationMirror>,Constable
Represents all possible states of structure when rorating or mirroring
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<RotationMirror> static final RotationMirror[]static final RotationMirror[]static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, RotationMirror> -
Method Summary
Modifier and TypeMethodDescriptionadd(RotationMirror other) net.minecraft.world.level.block.state.BlockStateapplyToBlockState(net.minecraft.world.level.block.state.BlockState blockState) Deprecated.net.minecraft.world.level.block.state.BlockStateapplyToBlockState(net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) net.minecraft.core.BlockPosapplyToPos(net.minecraft.core.BlockPos pos) net.minecraft.core.BlockPosapplyToPos(net.minecraft.core.BlockPos pos, net.minecraft.core.BlockPos pivot) net.minecraft.world.phys.Vec3applyToPos(net.minecraft.world.phys.Vec3 pos) net.minecraft.world.phys.Vec3applyToPos(net.minecraft.world.phys.Vec3 pos, net.minecraft.core.BlockPos pivot) booleannet.minecraft.world.level.block.Mirrormirror()mirrorate(net.minecraft.world.level.block.Mirror mirrorIn) static RotationMirrorof(net.minecraft.world.level.block.Rotation rotation, net.minecraft.world.level.block.Mirror mirror) rotate(net.minecraft.world.level.block.Rotation offset) net.minecraft.world.level.block.Rotationrotation()static RotationMirrorReturns the enum constant of this class with the specified name.static RotationMirror[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NONE
-
R90
-
R180
-
R270
-
MIR_NONE
-
MIR_R90
-
MIR_R180
-
MIR_R270
-
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,RotationMirror> STREAM_CODEC -
MIRRORED
-
NOT_MIRRORED
-
-
Method Details
-
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
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 nameNullPointerException- 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
-
mirrorate
-
mirrorate
- 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 transformpivot- 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 transformpivot- 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.useapplyToBlockState(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 transformlevel- in which given blockState livespos- where the given blockState is in given level- Returns:
- transformed blockState using this rot+mir
-
calcDifferenceTowards
- Parameters:
end- in which state we should end- Returns:
- end - this = what it takes from this to end
-
add
- See Also:
-
applyToBlockState(BlockState, Level, BlockPos), see vanilla methods for more info