Made in Germany with love (and beer)
- Source Code:
This is a small program to convert numeric item IDs in (config) files to the names of the Material enums and to the new changed Materials from the 1.13 release. It will also try to convert data values to the new separated 1.13 IDs (or back). (Currently only supported if they are separated by a colon)
While this conversion should work in most cases doing this automatically is error-prone, so you should go and check if it found every ID and didn't replace too much.
In the case of an unknown ID it will replace it with UNKNOWN_<found id> and it might add a NOTE_<id>:<message> to it when an ID/Material was irreplaceably removed.
IDConverter is runable from the command line (e.g. for servers).Optional parameters:
The syntax is: IDConverter.jar <file/folder name>
You can either input a single file in which you want to convert it or a full folder to convert all files in it.
The type of ID to replace from. Possible values: numeric, legacy (pre 1.13), flattening-rt,--replace-to
The type of ID to replace to. Possible values: numeric, legacy (pre 1.13), flattening-r,--regex <regex>
Regex for matching the ID string. Needs to have 3 groups. (One before, one the ID and the third the stuff after the ID)-d,--depth <amount>
Default: depending on replace-from
Amount of sub folders that should be searched though.-f,--file-match <regex>
Files need to match this regex for the tool to replace stuff inside them-l,--lowercase true/false
Should the material name be lowercase?
When started directly it will open a GUI where you can select all the settings.As a library
You can also use IDConverter as a library. The easiest is probably to just shade in the IdMappings class and use the IdMappings#get(IdType,String) method to get the Mapping for a certain string by its type.
Maven dependency:Code (XML):<repository>
would convert toCode (YAML):example: 1:1
with the default settings.Code (YAML):example: granite
Contact me if you need any of these:
- Export mappings to file (csv)
- Import mappings from file
- Configurable data separator
- Progress bar
- Preset for replacement target strings (e.g. to replace a number to Material.ID)
If this tool has helped you I would really appreciate it if you bought me a beer!
E.g. via Patreon or Paypal or a crypto coin:
ID Converter 1.2.2
Convert item IDs to Material names. (Or back) Supports data values and the new 1.13 Materials!