Spice of Fabric (Fabric)

Spice of Fabric (Fabric)

593k Downloads

Food Diary has NBT errors after creation

Coyote21 opened this issue ยท 10 comments

commented

Minecraft 1.18.2
Fabric 0.14.3-0.14.5

If I create a Food Diary from a Writable Book and an Apple at the crafting table, the result is a Food Diary that looks correct but only ever shows Invalid NBT Data whenever I open it.

If I try to give myself the Food Diary using the following command I get the same broken book with the same error when opening:
/give @p minecraft:written_book{author: "Me",title: "",spiceoffabric:{food_journal:true} ,display:{Name:"{"translate":"Diet Journal","bold":true}"}}

But, If I use the cheat mode of REI to give myself the diary it works perfectly.

I can provide logs if required but there is nothing in them (that I can find) that relates to this issue.

commented

Hi, thanks for reporting this bug :)

I don't know how you've come to that command.
The correct tag is spiceoffabric:food_journal without an additional object, so the correct command would be:

/give @p minecraft:written_book{author: "Me",title: "","spiceoffabric:food_journal":true ,display:{Name:"{\"translate\":\"Diet Journal\",\"bold\":true}"}}

The recipe seems to work for me.
Can you post the NBT data of the broken book from the recipe?

commented

I can't remember where I got that command from but the one you suppled does work so thats my hacked solution for now.

The Journal prduced from crafting the recipe still does not work and I'm not sure how to get the NBT data but I found this command
/data get entity @s SelectedItem
which I used while holding the Food Journal in my hand and all I got back was
PLAYERNAME has the following entity data: {id: "minecraft:written_book", Count: 1b}
I'm guessing this is not what you're after, can you give me the correct command to get the NBT data from an item b/c I can't seem to find it anywhere.

commented

Hm, that was actually what I wanted to see :)

It looks like the recipe isn't applying the NBT data correctly - what other mods do you have installed?
And specifically, do you have KubeJS installed?

commented

My Server is heavily modded (> 200 mods) I have attached a txt file with a complete list, but specifically, yes, I not only use KubeJS, I rely on it for a lot of my personal tweaks and changes and to get certain mods to work together.

In fact the reason I was after the console command was to include it in a KubeJS script that is run when a new client first logs into the world, and thus give them the Food Diary. This works great now btw, thanks to the command you provided.

I kinda know my way around KubeJS now so if you can suggest what to look for I might be able to find what's causing the problem.

modList-2022_08_16_10-26.txt

commented

KubeJS itself is causing the issue, because of the controversial way of how they change the loading of recipes.
This makes it soft incompatible with Nbt Crafting, the mod on which this mod relies on.

I could try using a workaround I implemented in Nbt Crafting to fix this, but I heard reports that KubeJS has found a way to break that too.

commented

Well, I decided to give the workaround a try, so if you find the time, could you please check if works now? :)

commented

This issue has been marked as stale because of inactivity. Comment on this issue or it will be closed in 14 days.

commented

would using a special recipe, like leather armour dying or written book cloning, work?

commented

would using a special recipe, like leather armour dying or written book cloning, work?

Yes, I think so - it wouldn't easily show up in the recipe book though.

Is this issue still occurring with the latest version though?
Until I hear so, I'm going to assume that it's fixed.

commented

it's happening with Spice of Fabric 1.5.5+1.18.2
and KubeJS 1802.5.5-build.546

and many other mods