From f58d6aeff4d9b5657ff81ba7e44bf66b32e61289 Mon Sep 17 00:00:00 2001 From: TheBusyBiscuit Date: Thu, 11 Jun 2020 00:43:17 +0200 Subject: [PATCH] Small performance improvement --- CHANGELOG.md | 2 ++ .../slimefun4/implementation/listeners/CargoNodeListener.java | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b1e24a26..2ec1d3590 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ * Added Cocoa Organic Food * Added Cocoa Fertilizer * Added a configurable limit to the Pickaxe of Vein Mining +* Added Gold Ingot to Dust recipe to the Electric Ingot Pulverizer #### Changes * Fixed a few memory leaks @@ -38,6 +39,7 @@ * Crafting Organic Food/Fertilizer yields more output now * Organic Food (Melon) now uses Melon Slices instead of Melon blocks * The Seismic Axe now skips the first two blocks to clear your field of view +* Small performance improvements #### Fixes * Fixed Ore Washer recipes showing up twice diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/CargoNodeListener.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/CargoNodeListener.java index 0381aa4a4..1b8481ca5 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/CargoNodeListener.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/listeners/CargoNodeListener.java @@ -6,6 +6,7 @@ import org.bukkit.event.block.BlockPlaceEvent; import org.bukkit.inventory.ItemStack; import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils; +import io.github.thebusybiscuit.slimefun4.utils.itemstack.ItemStackWrapper; import me.mrCookieSlime.Slimefun.SlimefunPlugin; import me.mrCookieSlime.Slimefun.Lists.SlimefunItems; @@ -24,7 +25,7 @@ public class CargoNodeListener implements Listener { @EventHandler(ignoreCancelled = true) public void onCargoNodePlace(BlockPlaceEvent e) { - if (e.getBlock().getY() != e.getBlockAgainst().getY() && isCargoNode(e.getItemInHand())) { + if (e.getBlock().getY() != e.getBlockAgainst().getY() && isCargoNode(new ItemStackWrapper(e.getItemInHand()))) { SlimefunPlugin.getLocal().sendMessage(e.getPlayer(), "machines.CARGO_NODES.must-be-placed", true); e.setCancelled(true); }