1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00
This commit is contained in:
TheBusyBiscuit 2020-05-30 16:21:13 +02:00
parent 9297495cd3
commit c85b29c009
2 changed files with 7 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#### Fixes
* Fixed Ore Washer recipes showing up twice
* Fixed #1942
* Fixed #1943
## Release Candidate 12 (27 May 2020)

View File

@ -118,8 +118,13 @@ class ExplosiveTool extends SimpleSlimefunItem<BlockBreakHandler> implements Not
b.breakNaturally();
}
else {
boolean applyFortune = b.getType().name().endsWith("_ORE") && b.getType() != Material.IRON_ORE && b.getType() != Material.GOLD_ORE;
for (ItemStack drop : b.getDrops(getItem())) {
b.getWorld().dropItemNaturally(b.getLocation(), (b.getType().toString().endsWith("_ORE") && b.getType() != Material.IRON_ORE && b.getType() != Material.GOLD_ORE) ? new CustomItem(drop, fortune) : drop);
// For some reason this check is necessary with Paper
if (drop != null && drop.getType() != Material.AIR) {
b.getWorld().dropItemNaturally(b.getLocation(), applyFortune ? new CustomItem(drop, fortune) : drop);
}
}
b.setType(Material.AIR);