[1.12] Scripts don't work in Multiplayer
Opened this issue ยท 16 comments
In the single player, the crafts work well, but in multiplayer ( Sponge ) they don't work!
Script: https://hastebin.com/ahisodabad.xml
Crafttweaker log: https://hastebin.com/wotumequdo.md
- Minecraft: 1.12
- Forge: 1.12.2-2555
- Crafttweaker: CraftTweaker2-1.12-4.0.10
fml-latest-log: https://pastebin.com/DrxRfuKW
Didn't mean to close this originally, but atleast that is valid now. Read the docs, it says that scripts need to be on both sides
How come this has changed? For all the years we have been using mine/crafttweaker client side scripts have never been required.
It makes the mod extremely less useful now.
I wasn't really referring to reloading although after reading that its probably related, I was referring to clients requiring the same scripts as the server. We host servers and use scripts to edit/remove/fix recipes for items and blocks for many reasons, being unable to use craft tweaker in that capacity is no longer viable now.
I understand there were changes that make this difficult I was just pointing out that without this ability to force recipe changes to clients from the server that the mod is no longer useful for that purpose, which i was assuming was pretty much one of the core features of the mod.
As is the case with minecraft, it's always 1 step forward 2 steps backwards (not pointing blame at mod devs here btw)
yeah, i get why it won't work with the forced recipes from the server side:
without the ability to reload scripts after post init, every player would have to restart their client after syncing scripts with the server, but at the same time, a feature like that should be implemented, because some servers require recipe changes that sync with every single client that connects to said server (e.g. if you set up a server that has custom in-game mechanics). please, if you find the time, make it possible to change recipes server side without the clients having to download the scripts from a place like google drive or others before joining to play with the intended recipes.
also a big issue i see the way it is now: if i understood everything right, the recipes actually usable in-game are set by the client side scripts, which would make it possible to add a simple cobblestone to diamond recipe on your own client, join a server, and ruining everything by being able to craft literally everything for anything and make it as cheap as you want, which makes servers in general completely unusable with this mod installed without the option to sync the scripts/validate that client and server have the same scripts
A) No, the recipes are enforced by the server, a clientside script might be shown in JEI or even in the crafting table if you put the items in, but in the end you'll fail when you try to take the result from the crafting output and thereby send a crafting event to the server which will tell you that such a recipe does not exist, end of story.
B) Sending recipes from server to client is not feasible the way it is at the moment, as you would still need to restart the game afterwards. Also, we learned from MC 1.7 that if the scripts are synched when the people try to connect to the server, they might timeout in larger packs and are thus never able to actually join a server (ontop of the long load times while trying to join). And when looking at mods like ContentTweaker, you might not even be able to connect to the server if the scripts are not there as it would tell you about inconsistent blocks/items mapping as the client would not have the same blocks/items registered due to missing scripts and thereby block/item registrations.
C) Allowing for another way of getting the scripts from the server poses an increased risk for the server owners so we won't add that.
ok, that makes more sense, still would be nice to add a client side command/button to automatically get the server scripts sop the server recipes are shown in jei
draconic evolution does this with their config file, if the client config differs from the server config, it forces you to either get the server config and restart your client or get off the server completely
Yeah but DE has a fixed set of configuration options, whereas CrT is not only CrT, but also scripts from numerous addon mods.
It is not feasible for us to even support all possible crafting table recipes that are doable using only CrT, how do you expect everything else to be parsed?
Example:
recipes.addShapeless("some_recipe", <minecraft:bedrock>, [<*>.only(function(item){return !<minecraft:diamond>.matches(item)}, <minecraft:flint_steel>.onlyWithDamageBetween(11, 13), <minecraft:diamond_pickaxe>.anyDamage().onlyWithTag({ench: [{id: 10, lvl: 1}]})]);
The way CrT currently works we can't even show some of those recipes in JEI even if the client has the script, how should we show them if the client would not have them?
And as I said, adding a way of fetching the recipes from the client would pose a security risk for server owners.
ok, guess the only way then is to stick to pre made scripts from modpack downloads or give the players a wetransfer link to the scripts folder
and i didn't mean a way for the server to fetch the client side scripts, i meant a way for the players to use a command on their client to fetch the scripts folder from the server, not the other way around, would still be a security risk, but more for the client and not for the server owner