Interface IBlockPosOffsetEnum


public interface IBlockPosOffsetEnum
  • Method Summary

    Modifier and Type
    Method
    Description
    static <E extends Enum<E> & IBlockPosOffsetEnum>
    E
    fromOffset(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 offset
    net.minecraft.core.BlockPos
     
    static net.minecraft.world.level.block.Rotation
    rotationFromDirection(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, probably used in a BlockState
      Parameters:
      enumClass - The .class of the enum this is implemented on
      fallback - 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