Class BlockHelper
java.lang.Object
com.simibubi.create.foundation.utility.BlockHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.level.block.state.BlockStatecopyProperties(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.BlockStatecopyProperty(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 voiddestroyBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, float effectChance) static voiddestroyBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, float effectChance, Consumer<net.minecraft.world.item.ItemStack> droppedItemCallback) static voiddestroyBlockAs(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 booleanextinguishFire(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 intfindAndRemoveInInventory(net.minecraft.world.level.block.state.BlockState block, net.minecraft.world.entity.player.Player player, int amount) static doublegetBounceMultiplier(net.minecraft.world.level.block.Block block) static net.minecraft.world.item.ItemStackgetRequiredItem(net.minecraft.world.level.block.state.BlockState state) static booleanhasBlockSolidSide(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 booleanisSolidWall(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos fromPos, net.minecraft.core.Direction toDirection) static booleannoCollisionInSpace(net.minecraft.world.level.BlockGetter reader, net.minecraft.core.BlockPos pos) static voidplaceSchematicBlock(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.BlockStatesetZeroAge(net.minecraft.world.level.block.state.BlockState blockState)
-
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)
-