diff --git a/plugin/src/main/java/io/github/zrdzn/minecraft/lovelydrop/drop/DropListener.java b/plugin/src/main/java/io/github/zrdzn/minecraft/lovelydrop/drop/DropListener.java index 1cdc02d..54f2d2f 100644 --- a/plugin/src/main/java/io/github/zrdzn/minecraft/lovelydrop/drop/DropListener.java +++ b/plugin/src/main/java/io/github/zrdzn/minecraft/lovelydrop/drop/DropListener.java @@ -67,7 +67,17 @@ public void onSourceBreak(BlockBreakEvent event) { Block block = event.getBlock(); - MaterialData source = block.getState().getData(); + MaterialData source = null; + for (MaterialData legacyData : this.dropItemCache.getDrops().keySet()) { + if (block.getType() == legacyData.getItemType() && block.getData() == legacyData.getData()) { + source = legacyData; + break; + } + } + + if (source == null) { + return; + } // Get optional drops from source blocks. Set sourceDrops = this.dropItemCache.getDrops(source);