Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.17.1] Multi layer model


vl20100
 Share

Recommended Posts

Hi,

I'm creating a mod that adds overlays on some Minecraft's textures.

Here is my model file for the stone block :

Spoiler
{
  "parent": "block/block",
  "textures": {
    "particle": "block/stone",
    "block": "block/stone",
    "overlay": "assembledblocks:block/overlays/assembled_stone"
  },
  "elements": [
    {
      "from": [ 0, 0, 0 ],
      "to": [ 16, 16, 16 ],
      "faces": {
        "down":  { "uv": [0, 0, 16, 16], "texture": "#block", "cullface": "down" },
        "up":    { "uv": [0, 0, 16, 16], "texture": "#block", "cullface": "up" },
        "north": { "uv": [0, 0, 16, 16], "texture": "#block", "cullface": "north" },
        "south": { "uv": [0, 0, 16, 16], "texture": "#block", "cullface": "south" },
        "west":  { "uv": [0, 0, 16, 16], "texture": "#block", "cullface": "west" },
        "east":  { "uv": [0, 0, 16, 16], "texture": "#block", "cullface": "east" }
      }
    },
    {
      "from": [ 0, 0, 0 ],
      "to": [ 16, 16, 16 ],
      "faces": {
        "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" }
      }
    }
  ]
}

 

My texture has transparency.

My block's display works fine on my blockItem but not on my block (as you can see below).

Spoiler

java_eXaSoV92Un.png

Can you tell me where is my mistake ?

Thank you.

Link to comment
Share on other sites

On 9/24/2021 at 3:54 PM, Luis_ST said:

you need to register a new RenderType for the Block, use ItemBlockRenderTypes#setRenderLayer in FMLClientSetupEvent

Hi,

Thank you for your answer.

How can I do that ? Have you a code sample for me please ?

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.

Guest
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.