ID Converter 1.2.2

Convert item IDs to Material names. (Or back) Supports data values and the new 1.13 Materials!

  1. Phoenix616
    [​IMG] Made in Germany with love (and beer)

    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.

    Command Line
    IDConverter is runable from the command line (e.g. for servers).
    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.
    Optional parameters:
    -rf,--replace-from
    The type of ID to replace from. Possible values: numeric, legacy (pre 1.13), flattening
    Default: numeric
    -rt,--replace-to
    The type of ID to replace to. Possible values: numeric, legacy (pre 1.13), flattening
    Default: 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)
    Default: depending on replace-from
    -d,--depth <amount>
    Amount of sub folders that should be searched though.
    Default: 1
    -f,--file-match <regex>
    Files need to match this regex for the tool to replace stuff inside them
    Default: \w+\.yml
    -l,--lowercase true/false
    Should the material name be lowercase?
    Default: true
    GUI
    When started directly it will open a GUI where you can select all the settings.

    [​IMG]
    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 repository:
    Code (XML):
    <repository>
        <id>minebench-repo</id>
        <url>https://repo.minebench.de/</url>
    </repository>
    Maven dependency:
    Code (XML):
    <dependency>
        <groupId>de.themoep.idconverter</groupId>
        <artifactId>mappings</artifactId>
        <version>1.2-SNAPSHOT</version>
    </dependency>

    Example
    Code (YAML):
    example: 1:1
    another
    : 3
    would convert to
    Code (YAML):
    example: granite
    another
    : grass
    with the default settings.​

    ToDo

    Contact me if you need any of these:​
    • Plugin
    • 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)
    Links
    Donations
    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:
    Ðoge: D7G4Svo7GTNHpuhjwUBj2k7qANnZHwYD4p
    BTC: 1EXMFRknc7kLwCmM1zf5LXNnPD4ihVCEhQ

    Other Resources
    [​IMG]
    This resource is distributed without any warranty or liability by the author.
    GabTM, pinkpig, LlmDl and 1 other person like this.

Recent Reviews

  1. HexedHero
    HexedHero
    5/5,
    Version: 1.2.2
    Best thing ever, thank you so much!
    --------------------------------------------
  2. frizzbee30
    frizzbee30
    5/5,
    Version: 1.2.1
    Brilliant, early testing but seems to work great with some minor checking of the results :)
  3. Crazyfak
    Crazyfak
    5/5,
    Version: 1.2.1
    you save my month by this soft, I love regex and you are a good guy.
    Others doesn't know how to use regex.
  4. CaszGamerMD
    CaszGamerMD
    3/5,
    Version: 1.2.1
    great idea and does what its told to do, but it will change all values that are,
    Example: 1
    which doesnt really fix or help anything.
    1. Phoenix616
      Author's Response
      You have to use the correct regex that matches your data that you want to convert and don't match the parts that you don't want to convert.