[bug] Recipes with require data tag are not working as intended in Servers
xxfast opened this issue · 4 comments
Version
1.17.1
, with mod version 1.17:2+
Describe the bug
A recipe with a data.require
works for the client, but won't work in the server
To Reproduce
- Use this json
{
"type": "minecraft:crafting_shaped",
"group": "test",
"pattern": [
"A",
"P"
],
"key": {
"A": {
"item": "minecraft:apple"
},
"P": {
"item": "minecraft:iron_pickaxe",
"data": {
"require": {
"Damage": 4,
"RepairCost": ""
}
}
}
},
"result": {
"item": "minecraft:apple"
}
}
- Checkout the video showcasing the behavior in the client vs on the server
client-vs-server.mov
Expected behavior
The behaviour on the server and the client to match
Additional context
Both the server and the client is loaded with these
modImplementation("de.siphalor:nbtcrafting-1.17:2+")
First of, thanks for the verbose bug report :)
I don't seem to be able to reproduce this issue, so I have to ask for some more information:
Can you check which exact version of Nbt Crafting gets loaded?
2+
instructs Gradle to try to find the latest version from 2 and up, but temporarily locks updating the dependency.
Also, have you checked that the recipe gets successfully loaded on the server?
You can check that using the /recipe give @s
command.
If the recipe gets loaded and is unlocked, then what does the recipe book do when you request the recipe?
Can you check which exact version of Nbt Crafting gets loaded? 2+ instructs Gradle to try to find the latest version from 2 and up, but temporarily locks updating the dependency.
According to .gradlew dependencies
it was using
de.siphalor:nbtcrafting-1.17:2+ -> 2.0.20+mc1.17.1
I've updated my build scripts to use the exact version now
modImplementation("de.siphalor:nbtcrafting-1.17:2.0.20+mc1.17.1")
Also, have you checked that the recipe gets successfully loaded on the server? You can check that using the /recipe give @s command.
Yup, did that on the server and the recipe seems to be loaded.
If the recipe gets loaded and is unlocked, then what does the recipe book do when you request the recipe?
When I opened the recipe book, I saw something.. weird
however, in the client this is working as expected
Looks like one of the recipe ingredients gets substituted with minecraft:horse_spawn_egg
for some bizarre reason
You can checkout my latest commit here on my mod to replicate this.
Hmm.. just forked your repo and ran the exact test in your testmod and I was not able to reproduce this. I'm stumped, any idea why is it behaving like this in my mod? 🤔