@sdee explains how file()
works when you leave out the .json
file extension
So
file("entities/armor/armorname")
= file("entities/armor/armorname/armorname.json")
= "yourmod/entities/armor/armorname/armorname.json"
and
file("entities/armor/armorname/armorname")
= file("entities/armor/armorname/armorname/armorname.json")
="yourmod/entities/armor/armorname/armorname/armorname.json"
TBH, I’m not sure if I’m a fan of the shorthand form either because it invites confusion like this, but perhaps less clutter in the code is important too. Anyway I hope that clears up what’s going on.
Edit :just some formatting etc.