DutchJelly / CraftEnhance

A Minecraft Plugin that allows server owners to create custom recipes in-game
Apache License 2.0
13 stars 10 forks source link

Recipes per world #57

Closed EditChris closed 10 months ago

EditChris commented 10 months ago

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.

broken1arrow commented 10 months ago

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.

broken1arrow commented 10 months ago

It this now added, Check the fork here https://www.spigotmc.org/resources/1-9-1-20-fork-custom-recipes-and-crafting-craftenhance.111998/.

EditChris commented 10 months ago

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.

broken1arrow commented 10 months ago

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.

EditChris commented 10 months ago

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:

broken1arrow commented 10 months ago

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.

broken1arrow commented 10 months ago

Alright I find the problem with the prompt. Was not hard to find the issue. Don't know how much you know about write code, but I forget the return, so it loop the prompt to the prompt ends/terminate automatic.

the_problem

EditChris commented 10 months ago

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:

broken1arrow commented 10 months ago

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.

broken1arrow commented 10 months ago

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.

EditChris commented 10 months ago

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.

broken1arrow commented 10 months ago

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.

EditChris commented 10 months ago

Yeah I am, 2.5.9.1.1

[12:30:52] [Server thread/INFO]: [CraftEnhance] Loading server plugin CraftEnhance v2.5.9.1.1

broken1arrow commented 10 months ago

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

EditChris commented 10 months ago

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.

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}

broken1arrow commented 10 months ago

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.

broken1arrow commented 10 months ago

So now should it work as it should, sorry for late update. Had other things I needed to do.

EditChris commented 10 months ago

I've been testing this new version, and made new discoveries about a lot of things of the recipe creation process:

broken1arrow commented 10 months ago

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.
  1. that sounds like strange bug, I have not touched that for a while. So in theory should that not happens.

  2. I don't think it exist a confirm menu when you remove a recipe. But will check why that not behaves as it should.

  3. I think I fixed that, but seams like that not get saved.

  4. I guess you save a recipe with air as output?

  5. 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.

broken1arrow commented 10 months ago

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.

EditChris commented 10 months ago

I think everything works great now! Thank you so much for all this help!