Jump to content

help with creating a custom shaped block using multiple textures


Rene

Recommended Posts

i am trying to create a custom shaped block using multiple textures for each face ( some use the same for saving resources ) the block property code is currently this ( green is the texture code and i think the problem is in there ) :

{
    code: "zombiemod",
    creativeinventory: { "general": ["*"] },
    blockmaterial: "Stone",
    drawtype: "json",
    shape: { base: "block/zombie1" },
    sidesolid: {
        all: "false"
    },
    sideopaque: {
        all: "false"
    },

    textures: {
          up: { base: "block" },
          down: { base: "block" },
          south: { base: "block" },
          north: { base: "block" },
          west: { base: "block" },
          east: { base: "block" },

    },
    resistance: 3.5,
    sounds: {
        "place": "game:block/anvil",
        "walk": "game:walk/stone"
    }
}

the textures are in textures/block/

under is what i wanted it to look like:

zombiemodel.thumb.PNG.808731bb17fbd8512fa18f0b914ac882.PNG

under is what it looks in game;

bruh.PNG.888f56f628d6ea4fdfc1c0f4f16c9123.PNG

  • Like 1
Link to comment
Share on other sites

Yep, it's the green. The textures aren't being referenced - it shouldn't be the 'face' direction but the name of the texture. The block json handles which face the textures go on (which model viewer has done as you've UV mapped it), blocktype just defines which textures are needed by the block. Like telling the game 'load this 3d model/block with these textures'.

For example, in model viewer, I'm using the game textures 'vintage' (glass) and 'floor' (chest) assigned to my model. These are the file names of the png textures. You can find what texture is assigned to what shape in the block json under 'elements':

image.png.6b5fb0526bf6ac8f68549c2c65e05c2a.png

I would honestly just copy the "textures" bit from your block json and paste it in place of the green text in your blocktype json - make sure to specify if you're using game assets using 'game:' prefix and your brackets match up!

Example using custom texture in blocktype json: below 'oak1' is a game texture, 'oak1corner' is a texture I made and would come with the mod.
image.png.ce16f862cebc51bfd8d44f9be0b8200f.png

Side note, textures in the block json don't seem to need the game: prefix. I've just left them be as model viewer makes them, and amended the ones in the blocktype json as appropriate.

Hopefully that should fix it!

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.