Skip to content

Commit

Permalink
Fix #441
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Sep 3, 2024
1 parent d43f8c9 commit b9457af
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nova/src/main/kotlin/xyz/xenondevs/nova/util/BlockUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -525,12 +525,13 @@ object BlockUtils {
preventPacketBroadcast(willDestroy)
}

val blockEntity = level.getBlockEntity(nmsPos)
val removed = level.removeBlock(nmsPos, false)
if (removed) {
block.destroy(level, nmsPos, state)

if (drops && !player.isCreative) {
block.playerDestroy(level, player, nmsPos, state, level.getBlockEntity(nmsPos), tool.unwrap().copy())
if (!player.isCreative) {
block.playerDestroy(level, player, nmsPos, state, blockEntity, tool.unwrap().copy(), drops, false)
}
}
}.map { it.item.asBukkitMirror() }
Expand Down

0 comments on commit b9457af

Please sign in to comment.