Extra Hard Mode

Extra Hard Mode

63.1k Downloads

Fatal Error when using multiple TNT crafting

Eric-Chng opened this issue ยท 3 comments

commented

Crafting the TNT recipe when it's modified to give multiple tnt per craft in the plugin config.yml will throw a warning message.

[05:41:05] [Server thread/WARN]: java.lang.Throwable: Warning: A plugin is creating a recipe using a Deprecated method. This will cause you to receive warnings stating 'Tried to load unrecognized recipe: bukkit:<ID>'. Please ask the author to give their recipe a static key using NamespacedKey.
[05:41:05] [Server thread/WARN]: 	at org.bukkit.inventory.ShapedRecipe.<init>(ShapedRecipe.java:28)
[05:41:05] [Server thread/WARN]: 	at com.extrahardmode.features.MoreTnt.beforeCraft(MoreTnt.java:77)
[05:41:05] [Server thread/WARN]: 	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor45.execute(Unknown Source)
[05:41:05] [Server thread/WARN]: 	at org.bukkit.plugin.EventExecutor.lambda$create$1(EventExecutor.java:69)
[05:41:05] [Server thread/WARN]: 	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:80)
[05:41:05] [Server thread/WARN]: 	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[05:41:05] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:545)
[05:41:05] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_14_R1.event.CraftEventFactory.callPreCraftEvent(CraftEventFactory.java:1180)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.Container.a(Container.java:311)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerWorkbench.a(ContainerWorkbench.java:70)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:2318)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerWorkbench.lambda$a$0(ContainerWorkbench.java:80)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:33)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerAccess.lambda$a$0(ContainerAccess.java:59)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:10)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerAccess$2.a(ContainerAccess.java:46)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerAccess.a(ContainerAccess.java:58)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerWorkbench.a(ContainerWorkbench.java:79)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.InventoryCrafting.splitStack(InventoryCrafting.java:126)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.SlotResult.a(SourceFile:66)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.ContainerWorkbench.shiftClick(ContainerWorkbench.java:154)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1013)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.Container.a(Container.java:311)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1006)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:2318)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:33)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:990)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PacketPlayInWindowClick.a(SourceFile:10)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:923)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:23)
[05:41:05] [Server thread/WARN]: 	at java.lang.Thread.run(Thread.java:748)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.TickTask.run(SourceFile:18)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeTask(IAsyncTaskHandler.java:136)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandlerReentrant.executeTask(SourceFile:23)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.executeNext(IAsyncTaskHandler.java:109)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.aX(MinecraftServer.java:1013)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.executeNext(MinecraftServer.java:1006)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.IAsyncTaskHandler.awaitTasks(IAsyncTaskHandler.java:119)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.sleepForTick(MinecraftServer.java:990)
[05:41:05] [Server thread/WARN]: 	at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:923)
[05:41:05] [Server thread/WARN]: 	at java.lang.Thread.run(Thread.java:748)

Example of 1 full warning message above.

However, when multiple crafts are attempted, the warns flood the console without end, freezing and crashing the server. A user reported crafting the recipe 64 times before it froze and crashed the server. When trying to wait for an error message about the crash, the warning spammed so many times and locked up the console, forcing me to kill the server and restart.

Turning the TNT recipe down to 1 per craft resolved the issue.

Please let me know if you need to know more about the console or the error.

commented

Considering that the poll showed that most don't use this feature (less than 25%), and that it can be better provided by other plugins (e.g. CustomItemRecipes) I'll probably just remove this feature.

commented

Understandable.
Thanks for the prompt response.

commented

Looks like it's easier to fix than it is to remove (just need to generate a Namespaced Key), so am gonna do that.