KubeJS

KubeJS

69M Downloads

Can't rename anything

SandWoodJones opened this issue ยท 6 comments

commented

Minecraft Version

1.19

KubeJS Version

1900.5.5-build.27

Rhino Version

1802.1.14-build.206

Architectury Version

5.10.33

Forge/Fabric Version

Fabric 0.14.8

Describe your issue

After having some trouble renaming an item in the modpack I'm developing I decided to investigate and created a new minecraft instance with only kubejs and its dependencies installed. I added a en_us.json file to kubejs\assets\a_cool_thing\lang\ with this in it:

{
	"block.minecraft.granite": "this is a rock"
}

This doesn't work and granite remains granite.

Crash report/logs

No response

commented

did you put it in asset or asset_s_

commented

assets

commented

Turns out this isn't on us: For some reason, Mojang does language differently from all other resources, in that the order is... arbitrary. They go by namespaces first, then by resource packs, so KubeJS' resource pack being at the top of the list does... nothing. The only thing I can recommend you is maybe change the namespace of that lang file, but even that may or may not work since we cannot make any assumptions about the order of a HashMap's key set

commented

So changing the namespace to anything until I find one that works?

commented

Even then, it wouldn't be guaranteed to appear the same for every end user, depending on the extra mods and resource packs they install, but yes that SHOULD be fine hopefully?

commented

I've found a solution by putting the lang/en_us.json file inside the minecraft namespace in assets.