1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

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
This commit is contained in:
dNiym 2019-08-19 00:18:09 -04:00
parent 33a9a066a3
commit 24e9652857

View File

@ -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);