Update src/main/java/de/blazemcworld/blazinggames/events/BreakBlockEventListener.java

Co-authored-by: AstroSquared <sys@ivycollective.dev>
This commit is contained in:
XTerPL 2025-01-21 17:29:32 +01:00 committed by GitHub
parent 9d914d026c
commit e1b2998279
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -356,7 +356,7 @@ public class BreakBlockEventListener implements Listener {
if (!(block instanceof CraftBlock craftBlock)) return 0;
net.minecraft.world.level.block.state.BlockState nmsBlockState = craftBlock.getNMS();
BlockPos pos = ((CraftBlock) block).getPosition();
BlockPos pos = craftBlock.getPosition();
ServerLevel level = ((CraftBlock) block).getCraftWorld().getHandle();
return nmsBlockState.getBlock().getExpDrop(nmsBlockState, level, pos, CraftItemStack.asNMSCopy(tool), true);