CITResewn icon indicating copy to clipboard operation
CITResewn copied to clipboard

Properties with UTF-8 BOM encoding not loading

Open DanArtox opened this issue 1 year ago • 4 comments

The issue

I add new model to my RP mkb.json and others (look in the logs)...

  • type=item
  • matchItems=minecraft:netherite_sword minecraft:diamond_sword
  • model=./mkb.json
  • nbt.display.Name=iregex:(\u041c\u041a\u0411|MKB) mkb.properties

But the model is not displayed in the game. Errors appear in the logs - Unknown condition type "citresewn:type"

At the same time, my model "uzi" with properties:

  • type=item
  • matchItems=minecraft:bow
  • model=./uzi.json
  • nbt.display.Name=Micro-PP works great

I understand from the error text that the problem is in the "type" field. But why?..

How to reproduce

ELRP-models.zip

Logs

https://pastebin.com/gbE1jTDM

Checklist

  • [X] I checked the issues(both open and closed) and could not find a duplicate of my issue
  • [X] I am using the latest version of CIT Resewn for my Minecraft version
  • [X] I have disabled Broken Paths and the issue persists
  • [X] I am running the mod using Fabric Loader

DanArtox avatar Oct 11 '24 15:10 DanArtox

If u would use sinytra connecter than that is the problem, connector is not officially supported. But checklist says u are using Fabric Loader dn logs also saying Using legacy nbt.display.Name which would not appear in case with connector. And Im sure that this bit of logs is not helpful, u probably would like to send the whole log file if u want the problem to be resolved.

HiWord9 avatar Oct 11 '24 18:10 HiWord9

https://mclo.gs/woWlSKR full logs

DanArtox avatar Oct 11 '24 19:10 DanArtox

The files are encoded with something called "UTF-8 BOM" instead of the normal UTF-8. As a hotfix you can just save the file with a different encoding. image

Leaving the issue open until I fix the issue where it doesnt load it when it should've.

SHsuperCM avatar Oct 12 '24 05:10 SHsuperCM

Yes, it helped me Thanks!

DanArtox avatar Oct 12 '24 12:10 DanArtox