slipcor / TreeAssist

https://www.spigotmc.org/resources/treeassist.67436/
GNU General Public License v3.0
34 stars 19 forks source link

Cannot drop air? #60

Closed VL4DST3R closed 4 years ago

VL4DST3R commented 4 years ago

Just noticed i'm getting a flood of errors when players are cutting trees

11:38:01 [WARNING] [TreeAssist] Task #1393728 for TreeAssist v7.0.136 generated an exception
11:38:01 java.lang.IllegalArgumentException: Cannot drop air
11:38:01    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:01    at net.minecraft.server.v1_16_R1.EntityItem.setItemStack(EntityItem.java:407) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:01    at net.minecraft.server.v1_16_R1.EntityItem.<init>(EntityItem.java:39) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:01    at org.bukkit.craftbukkit.v1_16_R1.CraftWorld.dropItem(CraftWorld.java:598) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:01    at org.bukkit.craftbukkit.v1_16_R1.CraftWorld.dropItemNaturally(CraftWorld.java:613) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:01    at net.slipcor.treeassist.utils.BlockUtils.breakBlock(BlockUtils.java:86) ~[?:?]
11:38:01    at net.slipcor.treeassist.core.TreeStructure.maybeBreakBlock(TreeStructure.java:1235) ~[?:?]
11:38:01    at net.slipcor.treeassist.core.TreeStructure.access$000(TreeStructure.java:30) ~[?:?]
11:38:02    at net.slipcor.treeassist.core.TreeStructure$1InstantRunner.run(TreeStructure.java:1472) ~[?:?]
11:38:02    at org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftTask.run(CraftTask.java:81) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at org.bukkit.craftbukkit.v1_16_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:400) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at net.minecraft.server.v1_16_R1.MinecraftServer.b(MinecraftServer.java:1061) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at net.minecraft.server.v1_16_R1.DedicatedServer.b(DedicatedServer.java:354) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at net.minecraft.server.v1_16_R1.MinecraftServer.a(MinecraftServer.java:1009) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at net.minecraft.server.v1_16_R1.MinecraftServer.v(MinecraftServer.java:848) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at net.minecraft.server.v1_16_R1.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.1.jar:git-Spigot-9639cf7-4b9bc9d]
11:38:02    at java.lang.Thread.run(Unknown Source) [?:1.8.0_261]
slipcor commented 4 years ago

Seems like something in Spigot changed, and they added an "AIR" drop --- which is dumb because we should not get any drops then... an empty list and not a list containing AIR...

Well, this is at least an easy fix. I hope this is not happening anywhere where we get a block's drops :(