Jump to content

[SOLVED][1.8] Render Block Overlay


gottsch

Recommended Posts

Hi. I'm updating a mod from 1.7.10 to 1.8.  I have an ore block in which I use the vanilla/resourcepack stone as the texture with my ore as the overlay.  Following grass as an example I setup all my .json files similar (adding top and bottom with overlay).

Now the block renders white with the overlay, but the item in my hand renders correctly.  Not sure what is going there as I thought an item takes its model info from the block.

 

Ex.

7dc5f2310c.png

 

blockstates / titanium_ore.json:

{
    "variants": {
        "normal": { "model": "sgs_metals:titanium_block" }
    }
}

 

models.block / titanium_ore.json:

{
    "parent": "sgs_metals:block/titanium_ore_parent",
    "textures": {
        "particle": "blocks/stone",
        "bottom": "blocks/stone",
        "top": "blocks/stone",
        "side": "blocks/stone",
        "overlay": "sgs_metals:blocks/titanium_ore_overlay"
    }
}

models.block / titanium_ore_parent

{
    "elements": [
        {   "from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {
                "down":  { "uv": [ 0, 0, 16, 16 ], "texture": "#bottom", "cullface": "down" },
                "up":    { "uv": [ 0, 0, 16, 16 ], "texture": "#top",    "cullface": "up", "tintindex": 0 },
                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#side",   "cullface": "north" },
                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#side",   "cullface": "south" },
                "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#side",   "cullface": "west" },
                "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#side",   "cullface": "east" }
            }
        },
        {   "from": [ 0, 0, 0 ],
            "to": [ 16, 16, 16 ],
            "faces": {            	
                "down": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "tintindex": 0, "cullface": "down" },
                "up": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "tintindex": 0, "cullface": "up" },
                "north": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "tintindex": 0, "cullface": "north" },
                "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "tintindex": 0, "cullface": "south" },
                "west":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "tintindex": 0, "cullface": "west" },
                "east":  { "uv": [ 0, 0, 16, 16 ], "texture": "#overlay", "tintindex": 0, "cullface": "east" }
            }
        }
    ]
}

 

models.item / titanium_ore:

{
    "parent": "sgs_metals:block/titanium_ore",
    "display": {
        "thirdperson": {
            "rotation": [ 10, -45, 170 ],
            "translation": [ 0, 1.5, -2.75 ],
            "scale": [ 0.375, 0.375, 0.375 ]
        }
    }
}

 

Link to comment
Share on other sites

Hi

 

In 1.8, blocks are single layer only.  Items have multiple layers.

Some more info here

http://greyminecraftcoder.blogspot.com.au/2014/12/block-rendering-18.html

and here

http://greyminecraftcoder.blogspot.com.au/2014/12/item-rendering-18.html

 

I don't know of any inbuilt way yet to render blocks in 2 layers without using the TileEntitySpecialRenderer.  It is possible to add two-layer block rendering if you use ASM+Reflection to modify the vanilla code, that is pretty advanced.  It might be added to Forge in the near future if enough people ask.

 

-TGG

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.