Class BlockHelper

java.lang.Object
com.simibubi.create.foundation.utility.BlockHelper

public class BlockHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.block.state.BlockState
    copyProperties(net.minecraft.world.level.block.state.BlockState fromState, net.minecraft.world.level.block.state.BlockState toState)
     
    static <T extends Comparable<T>>
    net.minecraft.world.level.block.state.BlockState
    copyProperty(net.minecraft.world.level.block.state.properties.Property<T> property, net.minecraft.world.level.block.state.BlockState fromState, net.minecraft.world.level.block.state.BlockState toState)
     
    static void
    destroyBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, float effectChance)
     
    static void
    destroyBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, float effectChance, Consumer<net.minecraft.world.item.ItemStack> droppedItemCallback)
     
    static void
    destroyBlockAs(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack usedTool, float effectChance, Consumer<net.minecraft.world.item.ItemStack> droppedItemCallback)
     
    static boolean
    extinguishFire(net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player p_175719_1_, net.minecraft.core.BlockPos p_175719_2_, net.minecraft.core.Direction p_175719_3_)
     
    static int
    findAndRemoveInInventory(net.minecraft.world.level.block.state.BlockState block, net.minecraft.world.entity.player.Player player, int amount)
     
    static double
    getBounceMultiplier(net.minecraft.world.level.block.Block block)
     
    static net.minecraft.world.item.ItemStack
    getRequiredItem(net.minecraft.world.level.block.state.BlockState state)
     
    static boolean
    hasBlockSolidSide(net.minecraft.world.level.block.state.BlockState p_220056_0_, net.minecraft.world.level.BlockGetter p_220056_1_, net.minecraft.core.BlockPos p_220056_2_, net.minecraft.core.Direction p_220056_3_)
     
    static boolean
    isSolidWall(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos fromPos, net.minecraft.core.Direction toDirection)
     
    static boolean
    noCollisionInSpace(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos)
     
    static void
    placeSchematicBlock(net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos target, net.minecraft.world.item.ItemStack stack, net.minecraft.nbt.CompoundTag data)
     
    static net.minecraft.world.level.block.state.BlockState
    setZeroAge(net.minecraft.world.level.block.state.BlockState blockState)
     

    Methods inherited from class java.lang.Object

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

    • BlockHelper

      public BlockHelper()
  • Method Details

    • setZeroAge

      public static net.minecraft.world.level.block.state.BlockState setZeroAge(net.minecraft.world.level.block.state.BlockState blockState)
    • findAndRemoveInInventory

      public static int findAndRemoveInInventory(net.minecraft.world.level.block.state.BlockState block, net.minecraft.world.entity.player.Player player, int amount)
    • getRequiredItem

      public static net.minecraft.world.item.ItemStack getRequiredItem(net.minecraft.world.level.block.state.BlockState state)
    • destroyBlock

      public static void destroyBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, float effectChance)
    • destroyBlock

      public static void destroyBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, float effectChance, Consumer<net.minecraft.world.item.ItemStack> droppedItemCallback)
    • destroyBlockAs

      public static void destroyBlockAs(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, @Nullable net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack usedTool, float effectChance, Consumer<net.minecraft.world.item.ItemStack> droppedItemCallback)
    • isSolidWall

      public static boolean isSolidWall(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos fromPos, net.minecraft.core.Direction toDirection)
    • noCollisionInSpace

      public static boolean noCollisionInSpace(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos)
    • placeSchematicBlock

      public static void placeSchematicBlock(net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos target, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.nbt.CompoundTag data)
    • getBounceMultiplier

      public static double getBounceMultiplier(net.minecraft.world.level.block.Block block)
    • hasBlockSolidSide

      public static boolean hasBlockSolidSide(net.minecraft.world.level.block.state.BlockState p_220056_0_, net.minecraft.world.level.BlockGetter p_220056_1_, net.minecraft.core.BlockPos p_220056_2_, net.minecraft.core.Direction p_220056_3_)
    • extinguishFire

      public static boolean extinguishFire(net.minecraft.world.level.Level world, @Nullable net.minecraft.world.entity.player.Player p_175719_1_, net.minecraft.core.BlockPos p_175719_2_, net.minecraft.core.Direction p_175719_3_)
    • copyProperties

      public static net.minecraft.world.level.block.state.BlockState copyProperties(net.minecraft.world.level.block.state.BlockState fromState, net.minecraft.world.level.block.state.BlockState toState)
    • copyProperty

      public static <T extends Comparable<T>> net.minecraft.world.level.block.state.BlockState copyProperty(net.minecraft.world.level.block.state.properties.Property<T> property, net.minecraft.world.level.block.state.BlockState fromState, net.minecraft.world.level.block.state.BlockState toState)