New recipes work in single player, but not multiplayer (forge)
andrewminer opened this issue · 8 comments
What happens:
I've used the CTGUI feature to create a recipe to create coin items (from the Just Coins mod) by crafting them on a crafting table. I then dropped the recipe into my modpack's scripts directory. In particular, the one with the new recipes is 02_additional_recipes.zs.
When I start a single-player world, everything works as expected. However, when I start a dedicated server and connect with my client, none of the recipes in the indicated file work. I can see the new recipes in JEI, but when I place the required ingredients on the crafting table, no output object is placed on the right-hand side. This is true for all of the new recipes I've added in that script.
It's worth noting that some of the other effects from the other CraftTweaker scripts do work properly. In particular, those which remove recipes all work properly (e.g., 00_remove_items.zs).
I've also tried running the /crafttweaker syntax
command both on the client and on the server, and both report no errors. I have also double-extra-checked that both client and server have exactly the same set of scripts (both are on the same git commit, and both sets of files exactly match). I've also rebooted both to make sure they're really using the same version.
What you expected to happen:
I expect both single player and multiplayer worlds to allow all extra recipes to both show up in JEI as well as work on a crafting table.
Script used:
- scripts directory
- 02_additional_recipes.zs (this is the script which isn't working)
- 00_remove_items.zs (this is a script which is working)
crafttweaker.log file:
There is no crafttweaker.log
file on the server. Here is the crafttweaker.log produced by the client.
Affected Versions:
- Minecraft: 1.12.2
- Forge: 14.23.5.2776
- Crafttweaker: 4.1.9
- Using a server: Yes
- If yes, does the client have the exact same scripts?
- Yes. Both have this commit checked out.
Your most recent log file where the issue was present:
@TheIllusiveC4 — Could you comment on the error @kindlich mentions?
Same error in your log as illusivesoulworks/constructsarmory#137
You should update Construct's Armory to the latest version (and possibly your other mods as well).
That said, I'm doubtful that's related to this particular issue since no errors with CraftTweaker functionality due to the above issue have been reported to me.
First: Yes, there should be a crafttweaker.log on the server!
Second: ConstructArmory is messing up registration to ZS maybe that's involved...
I've updated Construct's Armory to version 1.2.2 (see the full modlist), but I'm still seeing the same error in the server log (see the new server.log). There is still no crafttweaker.log on the server side.
You should remove Construct's Armory and see if that resolves this issue, so that we can verify if the two issues are related or not.
I removed Construct's Armory, and while there is no longer the error message @kindlich first mentioned in the server.log, it didn't fix the original problem. The server still didn't have any CraftTweaker log, so I deliberately ran a few commands from within the game to force one to be written. Here's the server-side log, and the client-side log. While the server-side log doesn't show anything interesting, the client-side log seems to indicate success: including having added the new recipes. However, checking on a crafting table from within the game, I still see the same symptoms.
I think it's safe to say that Construct's Armory isn't the cause of the problem. Thanks, @TheIllusiveC4, for taking a look!
Okay... now I feel silly.
I've got all the files committed to GitHub to be sure that everyone has exactly the same configuration, and I have a shell script which sets up the server
directory to symlink the mods
, config
, scripts
, etc. directories from the server back to the git repository so that they share exactly the same files as the clients.
Turns out, my script had an error in it which meant that it failed to symlink the scripts
directory. I didn't notice this at first because CraftTweaker created an empty directory for me inside the server
directory. However, as I was looking things over one more time to see if I could figure out the problem, I noticed the problem.
After fixing the symlink and restarting the server, everything works exactly as it should. 😥
While this is all completely my own fault, it would have helped in diagnosing things if the client and/or server threw up a warning in the log saying that the scripts on either side were out of sync with one another. I thought I'd been so careful to keep them in sync that it didn't occur to me that they weren't in sync until very late in the investigation.
Sorry for the false alarm!