[1.20.4] add the chicken egg localization
Litchiiiiii opened this issue ยท 1 comments
Hi!CreeperHost,I'm a member of the VM-Chinese-translate-group.I want to add the chicken egg localization,just modify some code.
The code in the net/creeperhost/chickens/item/ItemChickenEgg.java -------getName() method
String name = this.getType(itemStack).getEntityName().replace("_", " ") + " egg";
String first = name.substring(0, 1).toUpperCase();
String formatted = first + name.substring(1);
return Component.literal(formatted);
modify to
return Component.translatable("entity.chickens."+getType(itemStack).getEntityName()).append(Component.translatable("item.chickens.chicken_egg.egg"));
And add the
"item.chickens.chicken_egg.egg" : " egg"
To en_us.json
I would be grateful if you allow me to submit a PR.