Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 ]
        }
    }
}

 

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

  • Author

Thanks.

 

I guess i'll just have to update my code you helped me with for 1.7.10.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.