From 24e9652857f8d7f12a1e9e9419902514847e718d Mon Sep 17 00:00:00 2001 From: dNiym Date: Mon, 19 Aug 2019 00:18:09 -0400 Subject: [PATCH] fix Item Duplication Bug #1003 This fix currently prevents stripped_ logs from being used at all in the table saw as the MaterialHelper.java in CS-Core lib needs to be updated to allow the wood type to be properly detected from the material name. Update submitted in cs-corelib -> https://github.com/TheBusyBiscuit/CS-CoreLib/pull/109 --- src/me/mrCookieSlime/Slimefun/Setup/SlimefunSetup.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/me/mrCookieSlime/Slimefun/Setup/SlimefunSetup.java b/src/me/mrCookieSlime/Slimefun/Setup/SlimefunSetup.java index 563aeb73b..9a8e6ecdf 100644 --- a/src/me/mrCookieSlime/Slimefun/Setup/SlimefunSetup.java +++ b/src/me/mrCookieSlime/Slimefun/Setup/SlimefunSetup.java @@ -1890,6 +1890,9 @@ public class SlimefunSetup { ItemStack log = p.getInventory().getItemInMainHand(); ItemStack item = new ItemStack(MaterialHelper.getWoodFromLog(log.getType()), 8); + if(item == null || item.getType() == Material.AIR) { + return false; + } b.getWorld().dropItemNaturally(b.getLocation(), item); b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, log.getType()); log.setAmount(log.getAmount() -1);