Recipes per world
EditChris opened this issue ยท 21 comments
I have a suggestion that would really improve this plugin, is it possible to add an option for the recipes to limit them to work only in certain worlds, instead of all the worlds on the server?
This would be a godsent to have. It would give a lot of control over where to have what recipe in the server, allowing for an amazing customization potential. Some people won't need it yeah, but people like me that has on the same server different worlds with different mechanics, we would have a great time with this for sure.
I have a suggestion that would really improve this plugin, is it possible to add an option for the recipes to limit them to work only in certain worlds, instead of all the worlds on the server?
This would be a godsent to have. It would give a lot of control over where to have what recipe in the server, allowing for an amazing customization potential. Some people won't need it yeah, but people like me that has on the same server different worlds with different mechanics, we would have a great time with this for sure.
I could add that option, in next version.
Yeah I understand it, glad to know that was fixed.
About what you said before of those worlds being custom, with that you mean other worlds apart from the main 3 default worlds? If so, yeah. I've been making more tests about this, and found some things that I think would be nice to know:
* The plugin is trying to load the recipes before the worlds are loaded, maybe that's why it's failing. * Looks like this plugin's implementation of NBT-API is outdated, as I found this on my logs, I don't know if this is intentional: `[02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] The NBT-API located at 'package craftenhance.libs.menulib.dependencies.nbt.nbtapi' seems to be outdated! [02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] Current Version: '2.11.2' Newest Version: 2.11.3' [02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] Please update the NBTAPI or the plugin that contains the api(nag the mod author when the newest release has an old version, not the NBTAPI dev)!` * If the world is not loaded and the error I've shown you messages ago appear, the plugin modifies the recipe/s and deletes the worlds. I don't know if that's intentional, but it's weird and annoying for it to do that. * Looks like the allowed worlds feature works just at creation, because after restarting my server with those recipes created I can't craft them anymore anywhere (tried with the default worlds for this).
I did rework this logic now, but for me it work fine. the worlds are loaded before the plugin is loaded so should not give problems. But I'm full aware this could happen (was a issue with furnace recipe, when it some times could not get the world).
But in this case it works so smooth, so i did not think it should be a issue in this case. That warn can you safely ignore, but will update that API.
Yeah I understand it, glad to know that was fixed.
About what you said before of those worlds being custom, with that you mean other worlds apart from the main 3 default worlds? If so, yeah. I've been making more tests about this, and found some things that I think would be nice to know:
* The plugin is trying to load the recipes before the worlds are loaded, maybe that's why it's failing. * Looks like this plugin's implementation of NBT-API is outdated, as I found this on my logs, I don't know if this is intentional: `[02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] The NBT-API located at 'package craftenhance.libs.menulib.dependencies.nbt.nbtapi' seems to be outdated! [02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] Current Version: '2.11.2' Newest Version: 2.11.3' [02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] Please update the NBTAPI or the plugin that contains the api(nag the mod author when the newest release has an old version, not the NBTAPI dev)!` * If the world is not loaded and the error I've shown you messages ago appear, the plugin modifies the recipe/s and deletes the worlds. I don't know if that's intentional, but it's weird and annoying for it to do that. * Looks like the allowed worlds feature works just at creation, because after restarting my server with those recipes created I can't craft them anymore anywhere (tried with the default worlds for this).
Should be fixed in latest release now. Did not fix the NBT-API error, but will fix that in next version, wanted to fix the main issue first.
The first error, is because you are still in the command prompt. it should auto close after 2 minutes or type 'quit' and enter in the chat should fix that.
After reproducing the error again, looks like the command prompt for the enabled worlds don't close. When you type the name of the first world and send it, the menu comes back again, but in the chat you can see it still asks you for a world. These are the steps to reproduce this:
* Perform: /ceh createrecipe * Create a workbench recipe * Open the new recipe settings menu * Add a world to the enabled worlds list. * After sending it, the menu will come back instantly. Notice then how the chat still asks you for input, and try using the same or other options that uses this command prompt. Finally, take a look at the console.
Alright, looks like I missed something in the code logic. I will also change so you can bypass the valid check for the world.
Furthermore I will add so you can't try open the prompt, if you already open it and will tell you to close the old one or wait.
Edit before I forget it, the stack trace in the console is how it works. It throw an error when you try open more than one on same player. It is often so bukkit and spigot api works, it is then up to us developer try find ways so this can't happen. In this case is it pretty straightforward solution for this. I can tell you this system for prompt is much more stable and better than the old system dutchjelly implemented. For ones you not get stuck forever if you forget to quit.
Yeah I understand it, glad to know that was fixed.
About what you said before of those worlds being custom, with that you mean other worlds apart from the main 3 default worlds? If so, yeah. I've been making more tests about this, and found some things that I think would be nice to know:
- The plugin is trying to load the recipes before the worlds are loaded, maybe that's why it's failing.
- Looks like this plugin's implementation of NBT-API is outdated, as I found this on my logs, I don't know if this is intentional:
[02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] The NBT-API located at 'package craftenhance.libs.menulib.dependencies.nbt.nbtapi' seems to be outdated! [02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] Current Version: '2.11.2' Newest Version: 2.11.3' [02:20:46] [Thread-16/WARN]: [NBTAPI] [NBTAPI] Please update the NBTAPI or the plugin that contains the api(nag the mod author when the newest release has an old version, not the NBTAPI dev)!
- If the world is not loaded and the error I've shown you messages ago appear, the plugin modifies the recipe/s and deletes the worlds. I don't know if that's intentional, but it's weird and annoying for it to do that.
- Looks like the allowed worlds feature works just at creation, because after restarting my server with those recipes created I can't craft them anymore anywhere (tried with the default worlds for this).
It this now added, Check the fork here https://www.spigotmc.org/resources/1-9-1-20-fork-custom-recipes-and-crafting-craftenhance.111998/.
I tried using it, but after using that new settings menu once to add a world, trying to use it again to add another world, or to change something else, prints in the console the following error:
[15:34:29 ERROR]: Could not pass event InventoryClickEvent to CraftEnhance v2.5.9.1 craftenhance.libs.prompt.prompt.library.utility.Validate$CatchExceptions: Player EditChris is already conversing! at craftenhance.libs.prompt.prompt.library.utility.Validate.checkBoolean(Validate.java:24) ~[CraftEnhance-2.5.9.1.jar:?] at craftenhance.libs.prompt.prompt.library.SimpleConversation.start(SimpleConversation.java:53) ~[CraftEnhance-2.5.9.1.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeSettings.run(RecipeSettings.java:134) ~[CraftEnhance-2.5.9.1.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeSettings$2.onClickInsideMenu(RecipeSettings.java:108) ~[CraftEnhance-2.5.9.1.jar:?] at craftenhance.libs.menulib.RegisterMenuAPI$MenuHolderListener.onMenuClicking(RegisterMenuAPI.java:130) ~[CraftEnhance-2.5.9.1.jar:?] at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-163] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-163] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-163] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3258) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1339) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1316) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1309) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1287) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-163] at java.lang.Thread.run(Thread.java:833) ~[?:?]
I tried edititing the recipes.yml file directly to add the other 2 worlds I needed to add for the two recipes I created, and after reloading the server, the plugin couldn't load the worlds, giving me this message on the console while everything was being loaded:
[15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_nether [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_the_end [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_nether [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_the_end [15:49:04] [Server thread/INFO]: [CraftEnhance] CraftEnhance is managed and developed by DutchJelly. [15:49:04] [Server thread/INFO]: [CraftEnhance] If you find a bug in the plugin, please report it to https://github.com/DutchJelly/CraftEnhance/issues . [15:49:04] [Server thread/INFO]: [CraftEnhance] Running a version check to check that the server is compatible with game version 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20. [15:49:04] [Server thread/INFO]: [CraftEnhance] The correct version is installed.
The first error, is because you are still in the command prompt. it should auto close after 2 minutes or type 'quit' and enter in the chat should fix that.
After reproducing the error again, looks like the command prompt for the enabled worlds don't close. When you type the name of the first world and send it, the menu comes back again, but in the chat you can see it still asks you for a world. These are the steps to reproduce this:
- Perform: /ceh createrecipe
- Create a workbench recipe
- Open the new recipe settings menu
- Add a world to the enabled worlds list.
- After sending it, the menu will come back instantly. Notice then how the chat still asks you for input, and try using the same or other options that uses this command prompt. Finally, take a look at the console.
I tried using it, but after using that new settings menu once to add a world, trying to use it again to add another world, or to change something else, prints in the console the following error:
[15:34:29 ERROR]: Could not pass event InventoryClickEvent to CraftEnhance v2.5.9.1 craftenhance.libs.prompt.prompt.library.utility.Validate$CatchExceptions: Player EditChris is already conversing! at craftenhance.libs.prompt.prompt.library.utility.Validate.checkBoolean(Validate.java:24) ~[CraftEnhance-2.5.9.1.jar:?] at craftenhance.libs.prompt.prompt.library.SimpleConversation.start(SimpleConversation.java:53) ~[CraftEnhance-2.5.9.1.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeSettings.run(RecipeSettings.java:134) ~[CraftEnhance-2.5.9.1.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeSettings$2.onClickInsideMenu(RecipeSettings.java:108) ~[CraftEnhance-2.5.9.1.jar:?] at craftenhance.libs.menulib.RegisterMenuAPI$MenuHolderListener.onMenuClicking(RegisterMenuAPI.java:130) ~[CraftEnhance-2.5.9.1.jar:?] at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-163] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-163] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-163] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3258) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1339) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1316) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1309) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1287) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1175) ~[paper-1.20.1.jar:git-Paper-163] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-163] at java.lang.Thread.run(Thread.java:833) ~[?:?]
I tried edititing the recipes.yml file directly to add the other 2 worlds I needed to add for the two recipes I created, and after reloading the server, the plugin couldn't load the worlds, giving me this message on the console while everything was being loaded:
[15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_nether [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_the_end [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_nether [15:49:04] [Server thread/INFO]: [CraftEnhance] Error -- This world could not be added: hardcore_the_end [15:49:04] [Server thread/INFO]: [CraftEnhance] CraftEnhance is managed and developed by DutchJelly. [15:49:04] [Server thread/INFO]: [CraftEnhance] If you find a bug in the plugin, please report it to https://github.com/DutchJelly/CraftEnhance/issues . [15:49:04] [Server thread/INFO]: [CraftEnhance] Running a version check to check that the server is compatible with game version 1.9, 1.10, 1.11, 1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20. [15:49:04] [Server thread/INFO]: [CraftEnhance] The correct version is installed.
The first error, is because you are still in the command prompt. it should auto close after 2 minutes or type 'quit' and enter in the chat should fix that.
I guess this is custom worlds? it should work also at least if the worlds are loaded. I only check with vanilla worlds but will also double check custom ones and see if I get same issue and will try fix it.
Sorry for late reply, of some reason GitHub not send me a note when this tread is updated.
Still not working, the recipes are still loading before the non-default worlds load. When I try to craft them, nothing happens. And when I reload the plugin, I can craft them, but everywhere, not just in the allowed worlds.
What about moving the recipe loading to just before the server is done loading, so it's one of the last things the server loads? Maybe that would fix everything and have complete compatibility with all world management plugins.
Still not working, the recipes are still loading before the non-default worlds load. When I try to craft them, nothing happens. And when I reload the plugin, I can craft them, but everywhere, not just in the allowed worlds.
What about moving the recipe loading to just before the server is done loading, so it's one of the last things the server loads? Maybe that would fix everything and have complete compatibility with all world management plugins.
Are you sure you use latest? It doesn't load the world in same way in the latest version. So it should work as attended now, but can check this again.
Yeah I am, 2.5.9.1.1
[12:30:52] [Server thread/INFO]: [CraftEnhance] Loading server plugin CraftEnhance v2.5.9.1.1
Yeah I am, 2.5.9.1.1
[12:30:52] [Server thread/INFO]: [CraftEnhance] Loading server plugin CraftEnhance v2.5.9.1.1
Alright should be solved now, thanks for the patience.
You can see here, when I test the function:
https://youtu.be/D9R_wbJDXG4
Finally the recipes work! But something that you changed in this version made all menu interactions throw stuff in the console. The first menu interaction drops this:
[14:58:09 WARN]: [com.dutchjelly.craftenhance.libs.menu.UpdateTitle] There was an error while updating the title. Please contact the developer for assistance. [14:58:09 WARN]: [com.dutchjelly.craftenhance.libs.menu.UpdateTitle] java.lang.reflect.InvocationTargetException: null at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] at com.dutchjelly.craftenhance.libs.menu.ContainerUtility.updateInventory(ContainerUtility.java:67) ~[CraftEnhance-2.5.9.1.2.jar:?] at com.dutchjelly.craftenhance.libs.menu.UpdateTitle.update(UpdateTitle.java:138) ~[CraftEnhance-2.5.9.1.2.jar:?] at com.dutchjelly.craftenhance.libs.menu.UpdateTitle.update(UpdateTitle.java:123) ~[CraftEnhance-2.5.9.1.2.jar:?] at com.dutchjelly.craftenhance.libs.menu.MenuUtility.updateTitle(MenuUtility.java:1019) ~[CraftEnhance-2.5.9.1.2.jar:?] at com.dutchjelly.craftenhance.libs.menu.MenuUtility.updateTittle(MenuUtility.java:615) ~[CraftEnhance-2.5.9.1.2.jar:?] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[paper-1.20.1.jar:git-Paper-167] at org.bukkit.craftbukkit.v1_20_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:480) ~[paper-1.20.1.jar:git-Paper-167] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1480) ~[paper-1.20.1.jar:git-Paper-167] at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:447) ~[paper-1.20.1.jar:git-Paper-167] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1394) ~[paper-1.20.1.jar:git-Paper-167] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1171) ~[paper-1.20.1.jar:git-Paper-167] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-167] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $ at com.google.gson.internal.Streams.parse(Streams.java:61) ~[gson-2.10.jar:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:72) ~[gson-2.10.jar:?] at net.minecraft.util.GsonHelper.fromNullableJson(GsonHelper.java:434) ~[?:?] at net.minecraft.util.GsonHelper.fromNullableJson(GsonHelper.java:480) ~[?:?] at net.minecraft.network.chat.Component$Serializer.fromJson(Component.java:531) ~[?:?] ... 17 more Caused by: com.google.gson.stream.MalformedJsonException: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 2 path $ at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar:?] at com.google.gson.stream.JsonReader.checkLenient(JsonReader.java:1463) ~[gson-2.10.jar:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:576) ~[gson-2.10.jar:?] at com.google.gson.stream.JsonReader.peek(JsonReader.java:433) ~[gson-2.10.jar:?] at com.google.gson.internal.Streams.parse(Streams.java:47) ~[gson-2.10.jar:?] at com.google.gson.internal.bind.TreeTypeAdapter.read(TreeTypeAdapter.java:72) ~[gson-2.10.jar:?] at net.minecraft.util.GsonHelper.fromNullableJson(GsonHelper.java:434) ~[?:?] at net.minecraft.util.GsonHelper.fromNullableJson(GsonHelper.java:480) ~[?:?] at net.minecraft.network.chat.Component$Serializer.fromJson(Component.java:531) ~[?:?] ... 17 more
And the next ones you do, throw this:
[14:58:19 WARN]: [com.dutchjelly.craftenhance.libs.menu.UpdateTitle] There was an error while updating the title. Please contact the developer for assistance. [14:58:19 WARN]: [com.dutchjelly.craftenhance.libs.menu.UpdateTitle] The set NMS values: ContainerUtility{packetClass=interface net.minecraft.network.protocol.Packet, handle=public net.minecraft.server.level.EntityPlayer org.bukkit.craftbukkit.v1_20_R1.entity.CraftPlayer.getHandle(), playerConnection=public net.minecraft.server.network.PlayerConnection net.minecraft.server.level.EntityPlayer.c, packetConnectionClass=class net.minecraft.server.network.PlayerConnection, chatComponentMethod=public static net.minecraft.network.chat.IChatMutableComponent net.minecraft.network.chat.IChatBaseComponent$ChatSerializer.a(java.lang.String), containersClass=class net.minecraft.world.inventory.Containers, containerClass=class net.minecraft.world.inventory.Container, packetConstructor=public net.minecraft.network.protocol.game.PacketPlayOutOpenWindow(int,net.minecraft.world.inventory.Containers,net.minecraft.network.chat.IChatBaseComponent), serverVersion=20.1, inventoryNMS=com.dutchjelly.craftenhance.libs.menu.nms.modules.V_1_20_Inventory@3e1980cb}
Finally the recipes work! But something that you changed in this version made all menu interactions throw stuff in the console.
I should have test this in the latest version. This is not a big issue, it should not break the menus or the plugin. I change to my other menu library and how the messages shows up is intentional (not clutter up the console, with same stack trace) and stop the usage of that method.
Will fix that in next version.
So now should it work as it should, sorry for late update. Had other things I needed to do.
I've been testing this new version, and made new discoveries about a lot of things of the recipe creation process:
-
When you create a workbench recipe that uses all 9 slots, the 3 slots on the bottom row are deleted when you save the new recipe.
-
When you try to delete the recipe, the confirmation menu doesn't appear, and the recipe enters a bugged state where you can't do anything to it.
-
There's no allowed world removal message. When you remove a world from the allowed worlds list you get the same message as if you added it to the list.
-
In some weird instances, you can get this:
[23:17:22 ERROR]: Could not pass event PrepareItemCraftEvent to CraftEnhance v2.5.9.1.3 java.lang.IllegalArgumentException: Recipe must have non-AIR result. at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-31.1-jre.jar:?] at org.bukkit.inventory.CraftingRecipe.<init>(CraftingRecipe.java:21) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.inventory.ShapedRecipe.<init>(ShapedRecipe.java:49) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftShapedRecipe.<init>(CraftShapedRecipe.java:19) ~[paper-1.20.1.jar:git-Paper-169] at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftShapedRecipe.<init>(CraftShapedRecipe.java:23) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.item.crafting.ShapedRecipe.toBukkitRecipe(ShapedRecipe.java:63) ~[?:?] at net.minecraft.world.item.crafting.ShapedRecipe.toBukkitRecipe(ShapedRecipe.java:33) ~[?:?] at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftInventoryCrafting.getRecipe(CraftInventoryCrafting.java:118) ~[paper-1.20.1.jar:git-Paper-169] at org.bukkit.event.inventory.PrepareItemCraftEvent.getRecipe(PrepareItemCraftEvent.java:30) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at com.dutchjelly.craftenhance.crafthandling.RecipeInjector.handleCrafting(RecipeInjector.java:119) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor178.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-169] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-169] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-169] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.event.CraftEventFactory.callPreCraftEvent(CraftEventFactory.java:1456) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.inventory.CraftingMenu.slotChangedCraftingGrid(CraftingMenu.java:92) ~[?:?] at net.minecraft.world.inventory.CraftingMenu.lambda$slotsChanged$0(CraftingMenu.java:103) ~[?:?] at net.minecraft.world.inventory.ContainerLevelAccess.lambda$execute$0(ContainerLevelAccess.java:67) ~[?:?] at net.minecraft.world.inventory.ContainerLevelAccess$2.evaluate(ContainerLevelAccess.java:54) ~[?:?] at net.minecraft.world.inventory.ContainerLevelAccess.execute(ContainerLevelAccess.java:66) ~[?:?] at net.minecraft.world.inventory.CraftingMenu.slotsChanged(CraftingMenu.java:102) ~[?:?] at net.minecraft.world.inventory.TransientCraftingContainer.setItem(TransientCraftingContainer.java:146) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.inventory.Slot.set(Slot.java:63) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.inventory.Slot.setByPlayer(Slot.java:59) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.inventory.Slot.safeInsert(Slot.java:133) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.inventory.AbstractContainerMenu.doClick(AbstractContainerMenu.java:555) ~[?:?] at net.minecraft.world.inventory.AbstractContainerMenu.clicked(AbstractContainerMenu.java:382) ~[?:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3266) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1338) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-169] at java.lang.Thread.run(Thread.java:833) ~[?:?]
-
And also this:
[23:21:08] [Server thread/ERROR]: Could not pass event InventoryClickEvent to CraftEnhance v2.5.9.1.3 java.lang.IllegalArgumentException: Recipe must have non-AIR result. at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-31.1-jre.jar:?] at org.bukkit.inventory.CraftingRecipe.<init>(CraftingRecipe.java:21) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.inventory.ShapedRecipe.<init>(ShapedRecipe.java:49) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftShapedRecipe.<init>(CraftShapedRecipe.java:19) ~[paper-1.20.1.jar:git-Paper-169] at org.bukkit.craftbukkit.v1_20_R1.inventory.CraftShapedRecipe.<init>(CraftShapedRecipe.java:23) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.world.item.crafting.ShapedRecipe.toBukkitRecipe(ShapedRecipe.java:63) ~[?:?] at net.minecraft.world.item.crafting.ShapedRecipe.toBukkitRecipe(ShapedRecipe.java:33) ~[?:?] at org.bukkit.craftbukkit.v1_20_R1.inventory.RecipeIterator.next(RecipeIterator.java:46) ~[paper-1.20.1.jar:git-Paper-169] at org.bukkit.craftbukkit.v1_20_R1.inventory.RecipeIterator.next(RecipeIterator.java:12) ~[paper-1.20.1.jar:git-Paper-169] at com.dutchjelly.craftenhance.crafthandling.RecipeLoader.unloadRecipe(RecipeLoader.java:159) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.crafthandling.RecipeLoader.unloadRecipe(RecipeLoader.java:198) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.crafthandling.RecipeLoader.loadRecipe(RecipeLoader.java:220) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.crafthandling.recipes.EnhancedRecipe.load(EnhancedRecipe.java:188) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeEditor.save(RecipeEditor.java:241) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeEditor.run(RecipeEditor.java:180) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.gui.guis.editors.RecipeEditor$2.onClickInsideMenu(RecipeEditor.java:131) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.libs.menu.MenuUtility.onClick(MenuUtility.java:660) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.dutchjelly.craftenhance.libs.menu.RegisterMenuAPI$MenuHolderListener.onMenuClicking(RegisterMenuAPI.java:198) ~[CraftEnhance-2.5.9.1.3.jar:?] at com.destroystokyo.paper.event.executor.MethodHandleEventExecutor.execute(MethodHandleEventExecutor.java:40) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:git-Paper-169] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.20.1.jar:git-Paper-169] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[paper-1.20.1.jar:git-Paper-169] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3258) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58) ~[?:?] at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?] at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1338) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1315) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1308) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1286) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1174) ~[paper-1.20.1.jar:git-Paper-169] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-169] at java.lang.Thread.run(Thread.java:833) ~[?:?]
I've been testing this new version, and made new discoveries about a lot of things of the recipe creation process:
- When you create a workbench recipe that uses all 9 slots, the 3 slots on the bottom row are deleted when you save the new recipe.
- When you try to delete the recipe, the confirmation menu doesn't appear, and the recipe enters a bugged state where you can't do anything to it.
- There's no allowed world removal message. When you remove a world from the allowed worlds list you get the same message as if you added it to the list.
- In some weird instances, you can get this:
[23:17:22 ERROR]: Could not pass event PrepareItemCraftEvent to CraftEnhance v2.5.9.1.3 java.lang.IllegalArgumentException: Recipe must have non-AIR result
- And also this:
[23:21:08] [Server thread/ERROR]: Could not pass event InventoryClickEvent to CraftEnhance v2.5.9.1.3 java.lang.IllegalArgumentException: Recipe must have non-AIR result.
-
that sounds like strange bug, I have not touched that for a while. So in theory should that not happens.
-
I don't think it exist a confirm menu when you remove a recipe. But will check why that not behaves as it should.
-
I think I fixed that, but seams like that not get saved.
-
I guess you save a recipe with air as output?
-
Same with last error also. Seams like the result/output item is set to air.
I have never seen this in this places in the code, only when start the server and some recipes is random set to air as result/output item.
I've been testing this new version, and made new discoveries about a lot of things of the recipe creation process:
* When you create a workbench recipe that uses all 9 slots, the 3 slots on the bottom row are deleted when you save the new recipe. * When you try to delete the recipe, the confirmation menu doesn't appear, and the recipe enters a bugged state where you can't do anything to it. * There's no allowed world removal message. When you remove a world from the allowed worlds list you get the same message as if you added it to the list. * In some weird instances, you can get this: `[23:17:22 ERROR]: Could not pass event PrepareItemCraftEvent to CraftEnhance v2.5.9.1.3 java.lang.IllegalArgumentException: Recipe must have non-AIR result. at ` * And also this: `[23:21:08] [Server thread/ERROR]: Could not pass event InventoryClickEvent to CraftEnhance v2.5.9.1.3 java.lang.IllegalArgumentException: Recipe must have non-AIR result. at `
Now should all bugs be hammer out, ones for all :) Your error messages have I not fixed, but guess you somehow save recipes with air/null as output item. If you know how you can replicate it, I can see if I can fix that also.