About NBT Data in Recipes
Chenjox opened this issue ยท 5 comments
Issue Description
In reference to Issue #201 I tried the procedure myself.
With the script implemented in Attempt 5 it failed, and carried over to all recipes with NBT Data in the script.
What Happens
Upon entering a valid recipe, the output isn't ready to be taken.
Step 1. Install the script
Step 2. Start Minecraft
Step 3. Go into a world
Step 4. Place the the engineering table down
Step 5. Place the ingredients in the correct order (Or use JEI)
Step 6. Watch as madness unfolds
For further Madness follow these Steps
Step 8. Leave the recipe inside the table
Step 9. Restart the game
Step 10. Take the now craftable Item out of the table
Step 11. Put the recipe into the table again
Step 12. Same as Step 6
I have a video of the steps 9 to 12
What You Expect to Happen
That the recipes doesn't fail to work.
Script
https://hastebin.com/mivopacevu.xml
The latter works, the first does not.
Affected Versions
Do not use latest
; please supply accurate version numbers.
- Minecraft: 1.12.2
- Forge: 1.12.2-forge1.12.2-14.23.5.2838
- CraftTweaker: 1.12-4.1.20
- Artisan Worktables: 1.12.2-1.22.15
- Athenaeum: 1.12.2-1.17.4
Works:
/give @p thermalinnovation:saw 1 0 {Energy: 0, Mode: 1}
Does NOT work:
/give @p thermalinnovation:saw 1 0 {Energy: 1, Mode: 1}
/give @p thermalinnovation:saw 1 0 {Energy: 20000, Mode: 1}
/give @p thermalinnovation:saw 1 0 {Energy: 40000, Mode: 1}
Thank you so much!!!
Using the steps you provided, I was able to reproduce the issue and use it as a place to start debugging.
I have determined that it is the act of viewing the recipe in JEI that causes it to stop working for any NBT values other than {Energy: 0, Mode: 1}
. I suspect that there is a flaw in AW's code that allows JEI to operate directly on recipe ingredients instead of a copy of the ingredients.
RecipeBuilder.get("engineer")
.setShapeless([<thermalinnovation:saw>])
.addOutput(<minecraft:dirt>)
.create();
Here are my results:
- Disable vanilla crafting for the Engineer's Worktable
- Load game and world
- Place Engineer's Worktable
- Place thermalinnovation:saw.withTag({Energy: 40000, Mode: 1}) in any slot
- Extract output
- Confirm recipe works
- Place thermalinnovation:saw.withTag({Energy: 40000, Mode: 1}) in any slot
- Confirm recipe works
- Remove saw item
- !!--> View the recipe in JEI
- Place thermalinnovation:saw.withTag({Energy: 40000, Mode: 1}) in any slot
- Confirm recipe no longer works
- Break the table
- Place a new table
- Place thermalinnovation:saw.withTag({Energy: 40000, Mode: 1}) in anyslot
- Confirm recipe no longer works
- Remove saw item
- Place thermalinnovation:saw.withTag({Energy: 0, Mode: 1}) in middle slot
- Confirm recipe works
The recipe continues to behave improperly until the game is reloaded.
Glad to be helping, tell me what to do next if you need it. (or ping me on discord Silvanus_Hunter)
Current Possible Workaround:
add to the Item in question (Saw or else) a .withTag({})
condition.
Script to confirm that this works:
https://hastebin.com/tomoralesa.xml
The Saw still doesn't work, but the magnet (also with a rf nbt powertag) works when adding the .withTag({})
condition.