Interface IBlockPosOffsetEnum
public interface IBlockPosOffsetEnum
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Enum<E> & IBlockPosOffsetEnum>
EfromOffset(Class<E> enumClass, net.minecraft.core.BlockPos offset, net.minecraft.core.Direction direction, E fallback) Returns an enum value of type E based on its BlockPos offsetnet.minecraft.core.BlockPosstatic net.minecraft.world.level.block.RotationrotationFromDirection(net.minecraft.core.Direction direction) Rotates a BlockPos
-
Method Details
-
getOffset
net.minecraft.core.BlockPos getOffset() -
fromOffset
static <E extends Enum<E> & IBlockPosOffsetEnum> E fromOffset(Class<E> enumClass, net.minecraft.core.BlockPos offset, @Nullable net.minecraft.core.Direction direction, E fallback) Returns an enum value of type E based on its BlockPos offset- Type Parameters:
E- Your enum.Class, probably used in a BlockState- Parameters:
enumClass- The .class of the enum this is implemented onfallback- Default value for when the offset doesn't match any other value
-
rotationFromDirection
static net.minecraft.world.level.block.Rotation rotationFromDirection(net.minecraft.core.Direction direction) Rotates a BlockPos
-