Class BlockUtils

java.lang.Object
com.portingdeadmods.portingdeadlibs.utils.BlockUtils

public final class BlockUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends net.minecraft.world.level.block.entity.BlockEntity>
    T
    getBE(Class<T> clazz, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos)
     
    static net.minecraft.core.BlockPos[]
    getBlocksAroundSelf3x3(net.minecraft.core.BlockPos selfPos)
     
    static net.minecraft.core.BlockPos[]
    getBlocksAroundSelfHorizontal(net.minecraft.core.BlockPos blockPos)
     
    static net.minecraft.world.level.block.state.BlockState
    rotateBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.state.properties.DirectionProperty prop, Comparable<?> currentValue)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BlockUtils

      public BlockUtils()
  • Method Details

    • getBlocksAroundSelfHorizontal

      public static net.minecraft.core.BlockPos[] getBlocksAroundSelfHorizontal(net.minecraft.core.BlockPos blockPos)
    • getBlocksAroundSelf3x3

      public static net.minecraft.core.BlockPos[] getBlocksAroundSelf3x3(net.minecraft.core.BlockPos selfPos)
    • rotateBlock

      public static net.minecraft.world.level.block.state.BlockState rotateBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.block.state.properties.DirectionProperty prop, Comparable<?> currentValue)
    • getBE

      @Nullable public static <T extends net.minecraft.world.level.block.entity.BlockEntity> T getBE(Class<T> clazz, net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos)