Package appeng.api.orientation
Enum Class BlockOrientation
- All Implemented Interfaces:
Serializable,Comparable<BlockOrientation>,Constable
All possible rotations for a fully orientable block.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockOrientationget(IOrientationStrategy strategy, net.minecraft.world.level.block.state.BlockState state) static BlockOrientationget(net.minecraft.core.Direction facing) static BlockOrientationget(net.minecraft.core.Direction facing, int spin) static BlockOrientationget(net.minecraft.core.Direction front, net.minecraft.core.Direction top) Gets the block orientation in which the blocks front and top are facing the specified directions.static BlockOrientationget(net.minecraft.world.level.block.entity.BlockEntity blockEntity) static BlockOrientationget(net.minecraft.world.level.block.state.BlockState state) intintintorg.joml.QuaternionfgetRelativeSide(net.minecraft.core.Direction side) getRelativeSides(Set<net.minecraft.core.Direction> sides) net.minecraft.core.DirectiongetSide(RelativeSide side) Set<net.minecraft.core.Direction> getSides(Set<RelativeSide> relativeSides) intgetSpin()com.mojang.math.Transformationbooleannet.minecraft.core.DirectionresultingRotate(net.minecraft.core.Direction facing) net.minecraft.core.Directionrotate(net.minecraft.core.Direction facing) rotateClockwiseAround(net.minecraft.core.Direction side) rotateClockwiseAround(net.minecraft.core.Direction.Axis axis, net.minecraft.core.Direction.AxisDirection direction) voidsetOn(net.minecraft.world.level.block.entity.BlockEntity be) Changes the orientation of the given block entity to this, if possible.voidsetOn(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Changes the orientation of the block at the given position/level to this, if possible.static BlockOrientationReturns the enum constant of this class with the specified name.static BlockOrientation[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DOWN_NORTH
-
DOWN_WEST
-
DOWN_SOUTH
-
DOWN_EAST
-
UP_NORTH
-
UP_EAST
-
UP_SOUTH
-
UP_WEST
-
NORTH_UP
-
NORTH_WEST
-
NORTH_DOWN
-
NORTH_EAST
-
SOUTH_UP
-
SOUTH_EAST
-
SOUTH_DOWN
-
SOUTH_WEST
-
WEST_UP
-
WEST_SOUTH
-
WEST_DOWN
-
WEST_NORTH
-
EAST_UP
-
EAST_NORTH
-
EAST_DOWN
-
EAST_SOUTH
-
-
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
-
setOn
public void setOn(net.minecraft.world.level.block.entity.BlockEntity be) Changes the orientation of the given block entity to this, if possible. -
setOn
public void setOn(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos) Changes the orientation of the block at the given position/level to this, if possible. -
isRedundant
public boolean isRedundant() -
getQuaternion
public org.joml.Quaternionf getQuaternion() -
getTransformation
public com.mojang.math.Transformation getTransformation() -
rotate
public net.minecraft.core.Direction rotate(net.minecraft.core.Direction facing) -
resultingRotate
public net.minecraft.core.Direction resultingRotate(net.minecraft.core.Direction facing) -
getAngleX
public int getAngleX() -
getAngleY
public int getAngleY() -
getAngleZ
public int getAngleZ() -
getSpin
public int getSpin() -
get
-
get
public static BlockOrientation get(net.minecraft.core.Direction front, net.minecraft.core.Direction top) Gets the block orientation in which the blocks front and top are facing the specified directions. -
get
-
get
-
get
-
get
public static BlockOrientation get(IOrientationStrategy strategy, net.minecraft.world.level.block.state.BlockState state) -
getSide
-
getRelativeSide
-
getSides
-
getRelativeSides
-
rotateClockwiseAround
-
rotateClockwiseAround
public BlockOrientation rotateClockwiseAround(net.minecraft.core.Direction.Axis axis, net.minecraft.core.Direction.AxisDirection direction)
-