Texture mapping to blocks...?

    Joined
    Jun 24, 2013
    Messages
    270
    Reaction score
    43
    I'm trying to build up my own little project to map out the recipes using the data files from the game and I wanted to see if I could use the textures from the data folder as well to create icons for each item. I could just manually key in all the blocks and their icon mappings, but I wanted to make this semi-automatic... I figured this would be a good way to keep it up to date using the Consistence value to determine the crafting requirements.

    In the BlockConfigImportTemplate is says that the textureIds for custom blocks go from 1792-2047 so I figured the default blocks might follow some logical pattern for texture mapping and I can't find a correlation between the texture file's grid of 16x16 grid (256 items) and the BlockConfig textureId values. For instance, Grey Hull is textureId 567, but it's texture is in t000.png on the second row first entry (block 16 if you count starting with 0 on the top left) I figured that maybe the values started at 512 for the default blocks, but 512 + 16 is not 567. Black is 558 which would make sense since it's right next to grey, but then white is 559, and it's 7 tiles away...

    I've scanned around the files to see if there's a mapping of textureIds to file/{x, y} of the tile and I can't seem to find it. Has anyone mapped the textureIds to textures in some way? Am I missing a file that will help me relate these textures to the appropriate block?


    Edit: After some digging, I found that I was looking at the wrong armor texture!

    t000.png = 0-255
    t001.png = 256-511
    t002.png = 512-767

    It all makes sense now!
     
    Last edited: