Jump to content

Recommended Posts

Posted

Hello,

 

I was wondering if there was a way to render one texture on top of another using 1.8's block models. For example, something like:

{
     "parent": "block/cube_all",
     "textures": {
          "all": {
               "layer0":  "blocks/stone",
               "layer1":  "blocks/torch"
          }
     }
}

would display a block with the texture of stone with the texture of a torch on top. I know you can do this with custom textures, I just wondered if it was possible to do it with layers.

 

Note: this is NOT a question about 3d block modelling

 

Note 2: sorry about any inaccuracies in the above model, I'm away from my computer.

 

Note 3: if any part of this question is unclear, ask about it - it's quite a hard thing to explain.

 

catch(Exception e)

{

 

}

Yay, Pokémon exception handling, gotta catch 'em all (and then do nothing with 'em).

Posted

Hi

 

There are a couple of ways I can think of

- either make your model with faces that overlap (eg two east faces) - don't forget to move one face out by a very small amount (say 0.001) to make sure it renders in front of the other one; or

- render in multiple render layers (SOLID, CUTOUT, CUTOUT_MIPPED, TRANSLUCENT)  using

Block
    /**
     * Queries if this block should render in a given layer.
     * ISmartBlockModel can use MinecraftForgeClient.getRenderLayer to alter their model based on layer
     */
    public boolean canRenderInLayer(EnumWorldBlockLayer layer)
    {
        return getBlockLayer() == layer;
    }

 

I don't think you can map two textures to the same face like your example. 

 

-TGG

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.

Announcements



×
×
  • Create New...

Important Information

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