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

Merge pull request #1014 from dniym/TableSaw2

Table Saw Bug #1003 fix
This commit is contained in:
TheBusyBiscuit 2019-08-19 09:45:39 +02:00 committed by GitHub
commit 36377c5777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1892,6 +1892,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);