Class BlockMovementChecks

java.lang.Object
com.simibubi.create.api.contraption.BlockMovementChecks

public class BlockMovementChecks extends Object
Provides several interfaces that can define the behavior of blocks when mounting onto contraptions: See each one for details.

For each interface, checks can be registered and queried. Registration is thread-safe and can be done in parallel mod init. Each query will iterate all registered checks of that type in reverse-registration order. If a check returns a non-PASS result, that is the result of the query. If no check catches a query, then a best-effort fallback is used.

  • Constructor Details

    • BlockMovementChecks

      public BlockMovementChecks()
  • Method Details

    • registerMovementNecessaryCheck

      public static void registerMovementNecessaryCheck(BlockMovementChecks.MovementNecessaryCheck check)
    • registerMovementAllowedCheck

      public static void registerMovementAllowedCheck(BlockMovementChecks.MovementAllowedCheck check)
    • registerBrittleCheck

      public static void registerBrittleCheck(BlockMovementChecks.BrittleCheck check)
    • registerAttachedCheck

      public static void registerAttachedCheck(BlockMovementChecks.AttachedCheck check)
    • registerNotSupportiveCheck

      public static void registerNotSupportiveCheck(BlockMovementChecks.NotSupportiveCheck check)
    • isMovementNecessary

      public static boolean isMovementNecessary(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
    • isMovementAllowed

      public static boolean isMovementAllowed(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos)
    • isBrittle

      public static boolean isBrittle(net.minecraft.world.level.block.state.BlockState state)
    • isBlockAttachedTowards

      public static boolean isBlockAttachedTowards(net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction direction)
    • isNotSupportive

      public static boolean isNotSupportive(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.Direction facing)