Trinkets (Fabric)

Trinkets (Fabric)

22M Downloads

slot_id changes do not apply on world load

Andrew6rant opened this issue ยท 3 comments

commented

I am changing the slot_id's of Trinket's default slots, but the changes only apply after /reload is ran.

Here are the affected files:

data\trinkets\slots\head\group.json
data\trinkets\slots\chest\group.json
data\trinkets\slots\legs\group.json
data\trinkets\slots\feet\group.json
data\trinkets\slots\offhand\group.json

The ID's I changed:

head - 5 -> 78
chest - 6 -> 79
legs - 7 -> 80
feet - 8 -> 81
offhand - 45 -> 77

Before /reload is ran (slots do not work):

before_reload

After /reload is ran (slots work):

after_reload

/reload has to be ran every time the player enters the world.

commented

This seems like some very peculiar data loading issue, Trinkets has no special casing for slot ids and everything is read from json, so I'm not sure what could be requiring a reload, have you tested different ways of providing these files like with a mod datapack/world datapack/editing trinkets?

commented

My initial test was through a mod-datapack (you can see the commit here: Andrew6rant/LittleBigInv@fa8988a). I then tested with a regular world datapack, and I had the exact same issue. Editing the Trinkets mod itself also led to the same problem.

But, now I think I know what is happening (and it is my fault, whoops!). It's most likely related to the way BigInv replaces slots. Specifically, armor and offhand ones.

At first I thought it was happening for slots outside of Vanilla's default range (45+), but then found out that this only breaks with EquipmentSlots. If I make a mod datapack/world datapack or edit the mod to change the slot_ids to be: 78, 79, 35, 12, then 35 and 12 will show up fine but 78 and 79 will need a /reload to appear.

commented

Oh that's very peculiar, but I believe outside of the scope of Trinkets, so I'll be closing. Best of luck with screen handlers, they are prickly