diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt index 2a1d8b81d..b369caf52 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/core/Ext.kt @@ -25,6 +25,7 @@ import net.minecraft.world.item.crafting.Ingredient import net.minecraft.world.level.BlockGetter import net.minecraft.world.level.Level import net.minecraft.world.level.block.Block +import net.minecraft.world.level.block.Blocks import net.minecraft.world.level.block.state.BlockState import net.minecraft.world.level.block.state.StateHolder import net.minecraft.world.level.block.state.properties.Property @@ -230,6 +231,7 @@ fun BlockState.getExplosionResistance(level: BlockGetter, pos: BlockPos): Float } fun Level.gracefulBlockBreak(blockPos: BlockPos, block: BlockState = getBlockState(blockPos)) { + block.onRemove(this, blockPos, Blocks.AIR.defaultBlockState(), false) Block.dropResources(block, this, blockPos, getBlockEntity(blockPos)) block.block.destroy(this, blockPos, block) setBlock(blockPos, block.fluidState.createLegacyBlock(), Block.UPDATE_ALL)