Jump to content

[1.12] Block overlays [solved]


GiantSafariMegladons

Recommended Posts

I've been trying to make a simple ore block. I only really want to have another texture overlay the default texture of the block I provide. I.e. stone texture as the background and some partial texture as the overlay. I'm stuck at the moment though, as you can probably see in the image below. I've provided the model and blockstate json as well as the class code and texture file.

 

How can I fix it so that the overlay renders on top of the background texture?

 

  Hide contents

{
  "parent": "block/cube_all",
  "textures": {
    "background": "crycore:blocks/ores/material_stone",
    "overlay": "crycore:blocks/ores/normal/overlay_aluminum",
    "particle": "blocks/stone"
  },
  "elements": [
    {
      "from": [ 0, 0, 0 ],
      "to": [ 16, 16, 16 ],
      "faces": {
        "up": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#background",
          "cullface": "up"
        },
        "down": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#background",
          "cullface": "down"
        },
        "north": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#background",
          "cullface": "north"
        },
        "south": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#background",
          "cullface": "south"
        },
        "west": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#background",
          "cullface": "west"
        },
        "east": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#background",
          "cullface": "east"
        }
      }
    },
    {
      "from": [ 0, 0, 0 ],
      "to": [ 16, 16, 16 ],
      "faces": {
        "up": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#overlay",
          "cullface": "up"
        },
        "down": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#overlay",
          "cullface": "down"
        },
        "north": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#overlay",
          "cullface": "north"
        },
        "south": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#overlay",
          "cullface": "south"
        },
        "west": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#overlay",
          "cullface": "west"
        },
        "east": {
          "uv": [ 0, 0, 16, 16 ],
          "texture": "#overlay",
          "cullface": "east"
        }
      }
    }
  ]
}

 

  Hide contents

{
  "forge_marker": 1,
  "defaults": {
    "model": "crycore:stone_ore_aluminum"
  },
  "variants": {
    "normal": [{}],
    "inventory": [{}]
  }
}

 

  Hide contents

public class StoneOreAluminum extends Block {

    public StoneOreAluminum() {
        super(Material.IRON);
        setTranslationKey(CryCore.MODID + ".stone_ore_aluminum");
        setRegistryName("stone_ore_aluminum");
        setCreativeTab(CryCore.tabCryCore);
    }

    @SideOnly(Side.CLIENT)
    public void initModel() {
        ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
    }
}

 

 

2019-11-19_15.17.09.png

overlay_aluminum.png

Edited by GiantSafariMegladons
Problem is a fixo
Link to comment
Share on other sites

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.