diff --git a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java index a423f9229..d74eb6483 100644 --- a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java @@ -124,10 +124,8 @@ public class InventoryListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onFurnaceExtractEvent(FurnaceExtractEvent event) { Block furnaceBlock = event.getBlock(); - BlockState furnaceState = furnaceBlock.getState(); - ItemStack result = furnaceState instanceof Furnace ? ((Furnace) furnaceState).getInventory().getResult() : null; - if (!ItemUtils.isSmelted(result)) { + if (!ItemUtils.isSmelted(new ItemStack(event.getItemType(), event.getItemAmount()))) { return; } @@ -137,7 +135,8 @@ public class InventoryListener implements Listener { return; } - event.setExpToDrop(UserManager.getPlayer(player).getSmeltingManager().vanillaXPBoost(event.getExpToDrop())); + int exp = UserManager.getPlayer(player).getSmeltingManager().vanillaXPBoost(event.getExpToDrop()); + event.setExpToDrop(exp); } @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) diff --git a/src/main/java/com/gmail/nossr50/util/ItemUtils.java b/src/main/java/com/gmail/nossr50/util/ItemUtils.java index 3e05496f7..b8a8d3d79 100644 --- a/src/main/java/com/gmail/nossr50/util/ItemUtils.java +++ b/src/main/java/com/gmail/nossr50/util/ItemUtils.java @@ -524,8 +524,8 @@ public final class ItemUtils { } for (Recipe recipe : mcMMO.p.getServer().getRecipesFor(item)) { - if (recipe instanceof FurnaceRecipe) { - return MaterialUtils.isOre(((FurnaceRecipe) recipe).getInput().getData()); + if (recipe instanceof FurnaceRecipe && MaterialUtils.isOre(((FurnaceRecipe) recipe).getInput().getData())) { + return true; } }