Jump to content

[1.8] Multi-Layer Block Texture


LogicTechCorp

Recommended Posts

No need to create a custom block renderer. By simply modifying the json model file you could get a multi-layer block. Just put two elements at same position but attach different textures.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Link to comment
Share on other sites

What I want to do is have different colored stone and overlay the ore texture on top of the stone. I am looking to add an api that will let other people add their own ores to my mod.

 

Example:

width=16 height=16https://dl.dropboxusercontent.com/u/248986518/stone_raw_white.png[/img] + width=16 height=16https://dl.dropboxusercontent.com/u/248986518/coal_overlay.png[/img] = width=16 height=16https://dl.dropboxusercontent.com/u/248986518/bright_coal_ore.png[/img]

Link to comment
Share on other sites

Oh, I see. You do need customize a block renderer.

Maybe this tutorial could help: http://www.minecraftforge.net/forum/index.php/topic,28714.0.html

 

Load a stone model and clone it first, then add ore quads, finally return it.

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Link to comment
Share on other sites

No need to use ISmartBlockModel, IModel is enough.

Following steps may help you:

[*]IModel.getTextures should return your stone texture and user defined ore overlay

[*]IModel.getDependencies should return your stone model because we would use it

[*]IModel.bake would return the model:

  • Use ModelLoaderRegistry.getModel to get your stone model
  • Create a SimpleBakedModel, using the property from your stone model
  • Add overlay to this SimpleBakedModel, to do this, you need to know about BakedQuad and SimpleBakedModel

 

But users have to provide a blockstate json file after all... I don't know much about how to map a blockstate file in codes.

 

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

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.