CIT Resewn

CIT Resewn

14M Downloads

Matching display name requires specific json format

SirSebi opened this issue ยท 12 comments

commented

If im turning on "allow broken paths in ressourcepacks" I can use my ressourcepack in singleplayer and it workes fine. (need to toggle this to on otherwise it wont load)

If im joining my server(which forces the server texturepack [same as in singleplayer] ), the ressourcepack gets applied but CIT isnt working. On renaming Items, the CIT is there for a milisecond then the items looks like normal.

commented

The problem is that one of the plugins you have is messing with the anvil's behavior.
When you rename it in an anvil, the client runs the vanilla code and then the server might change it in the next tick(which is why you see the item for a split second and then server is saying, "nope, rename it to this instead").
The plugin is changing the Name:'{"text":"Elven Bow"}' to Name:'{"extra":[{"text":"Elven Bow"}],"text":""}' which is fine for vanilla because it displays the same but then comes the cit.

elven_bow.properties has the line nbt.display.Name=ipattern:elven bow which internally is being taken and converted to nbt.display.Name=ipattern:{"text":"elven bow"}(which obviously doesnt match with the one the server has).

I'm closing the issue because CITResewn's display name default behavior is meant to be used with a vanilla anvil, the json text part is being added only if the pattern is not a json already.

To fix this you'd need to either remove the plugin causing the issue or replace the pattern with {"extra":[{"text":"elven bow"}],"text":""} or alternatively use wildcards with {*elven bow*} which gives a slightly different behavior(like allowing for things to be written before and after "elven bow").
Fixing it in CITResewn is going to hurt performance by quite a bit for everyone using the mod so I am not going to do that. If I manage to get caching working I might revisit this decision and make it evaluate the json.

commented

Breaking it down:
Internally server resourcepacks are handled the same way as zip resource packs.
You say it works in singleplayer so the pack itself isnt the problem.
On the server you say that when renaming items the cit flashes for a moment, meaning the cliient loads cits properly on the server as well.
Something in the cit check fails apparently, but before we get to that, can you provide the resourcepack and your logs?

commented

Here is my Texturepack:
https://www.dropbox.com/s/gw4f3gnefigwqp6/1.0.zip?dl=0
its a merge of a lot of cutom things. cause of that its 40mb :D

commented

Also need the logs and preferably the name of the item you tried to rename on the server

commented

My log: https://pastebin.com/yVu2ugAv
and I tried to rename my bow to Elven Bow and then to Soulfire Bow

Edit: Please use a text host when uploading logs ~SHCM

commented

You said "my server", I'm assuming you have op.
Can you rename the elven bow, hold it in the first hotbar slot, run /data get entity @s Inventory[0] and send the results?

commented

SirSebi has the following entity data: {Slot: 0b, id: "minecraft:bow", tag: {Damage: 6, display: {Name: '{"extra":[{"text":"Elven Bow"}],"text":""}'}, Enchantments: [{id: "minecraft:infinity", lvl: 1s}, {id: "minecraft:power", lvl: 5s}, {id: "minecraft:repairing", lvl: 3s}, {id: "minecraft:telekinesis", lvl: 1s}]}, Count: 1b}

commented

Is the server modded?

commented

its a Paper server running on 1.17.1 with plugins and datapacks

commented

Just one last sanity check, can you run /give @s bow{display:{Name:'{"text":"Elven Bow"}'}} and see that you get the elven bow texture on the server?

commented

yeah then i get the bow with the texture

commented

Fixed in v0.7.0