Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

load proper item names from minecraft.jar #33

Open
erisdev opened this issue Mar 27, 2011 · 2 comments
Open

load proper item names from minecraft.jar #33

erisdev opened this issue Mar 27, 2011 · 2 comments
Labels

Comments

@erisdev
Copy link

erisdev commented Mar 27, 2011

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.

@preble
Copy link
Owner

preble commented Mar 27, 2011

Thanks for the info, erisdiscord. Do you know how to map the numeric item id to the item.* name?

@erisdev
Copy link
Author

erisdev commented Mar 27, 2011

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants