mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 11:45: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:
parent
33a9a066a3
commit
24e9652857
@ -1890,6 +1890,9 @@ public class SlimefunSetup {
|
|||||||
ItemStack log = p.getInventory().getItemInMainHand();
|
ItemStack log = p.getInventory().getItemInMainHand();
|
||||||
|
|
||||||
ItemStack item = new ItemStack(MaterialHelper.getWoodFromLog(log.getType()), 8);
|
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().dropItemNaturally(b.getLocation(), item);
|
||||||
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, log.getType());
|
b.getWorld().playEffect(b.getLocation(), Effect.STEP_SOUND, log.getType());
|
||||||
log.setAmount(log.getAmount() -1);
|
log.setAmount(log.getAmount() -1);
|
||||||
|
Loading…
Reference in New Issue
Block a user