LogicTechCorp Posted April 9, 2015 Posted April 9, 2015 How would I create a multi-layer block texture? I know I have to create a custom block renderer but how do I go about doing it? Quote
herbix Posted April 9, 2015 Posted April 9, 2015 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. Quote Author of Tao Land Mod. http://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.
LogicTechCorp Posted April 9, 2015 Author Posted April 9, 2015 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: https://dl.dropboxusercontent.com/u/248986518/stone_raw_white.png[/img] + https://dl.dropboxusercontent.com/u/248986518/coal_overlay.png[/img] = https://dl.dropboxusercontent.com/u/248986518/bright_coal_ore.png[/img] Quote
herbix Posted April 9, 2015 Posted April 9, 2015 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. Quote Author of Tao Land Mod. http://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.
LogicTechCorp Posted April 9, 2015 Author Posted April 9, 2015 Sorry to be a bother but I read your tutorial and I understood it but I do not know how to implement it. Can you lead me into the right direction? Quote
herbix Posted April 9, 2015 Posted April 9, 2015 I don't know either. It depends on your api definations. Do api users provide a json model, or just an overlay texture? Quote Author of Tao Land Mod. http://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.
LogicTechCorp Posted April 9, 2015 Author Posted April 9, 2015 I provide the model they provide the overlay Quote
herbix Posted April 9, 2015 Posted April 9, 2015 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. Quote Author of Tao Land Mod. http://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.
Recommended Posts
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.