load proper item names from minecraft.jar
Opened this issue · 2 comments
I think Inside Job should load item names from minecraft.jar so if Mojang changes the names of items again, they'll be reflected in the editor interface immediately. The actual names are in minecraft.jar./lang/en_US.lang
and the format of the file is pretty simple—here are a few (non-contiguous in the real file) examples:
item.leggingsIron.name=Iron Leggings
item.yellowDust.name=Glowstone Dust
item.dyePowder.black.name=Ink Sac
item.diode.name=Redstone Repeater
There are also *.desc
entries, blank lines, messages and UI strings (e.g., options.sensitivity.max=HYPERSPEED!!!
), so don't count on all the lines being valid item name listings. I'd suggest reading non-blank lines into a dictionary as key=value pairs and replacing the item names in the CSV with item.*.name
, then using that as a key when displaying it.
The jar file itself is just a zip file with a particular directory structure inside, so reading this file should be trivial with a decent zip library.
Thanks for the info, erisdiscord. Do you know how to map the numeric item id to the item.* name?
There doesn't seem to be a way other than putting the item.*
name in the CSV. I've been looking around for some way to map them easily, but the order they're listed in the file seems to be "whatever" order.