Jump to content

Recommended Posts

Posted

Hey, I'm writing a mod that's primarily focused on adding some building materials. One such material is a framed daub (example reference image, and an example of some WIP blocks). Basically, strips of wood running in different directions on the block. There are a couple different possibilities: centered vertical board, centered horizontal board, edge boards, diagonal boards, and corner pieces. There are enough combinations there that making separate textures is completely impractical. So instead having a texture for every combination, I'd like to have one base texture, and then one texture with transparency for each frame type. That means I'd only need 13 textures. This leads me to two questions.

 

1) How can I render a finished texture? I would need to apply the base block texture, and then any applicable frame textures on the same face to build up the desired combination. Does anyone have an example of how such a renderer would work? I'm very inexperienced with rendering.

 

2) What would be the most efficient way to store that data? There are too many combinations to store the information as metadata (especially since these blocks are going to be sided, with framing only on one axis). The only alternative to my knowledge would be a tile entity. Now, a tile entity would be nice, since it would be trivial to not only store the data, but also store framing data individually for every side of the block. However, I've got reservations about using tile entities for a building material and it seems like a super shitty idea.

Posted

Use multiple layers.

For example, all of my ores use this model:

https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderores/models/block/hardore.json

Note there are twelve faces specified: each face of the block (up, down, north, etc) is specified twice with different textures each time.

 

You can use blockstates to indicate which texture-file (cross.png) gets drawn in each texture-reference (#overlay, #base, #foo).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Sorry, I missed the version number you're on.

1.7.10 isn't supported here any more.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Not really. But I do know you'll be interested in ISimpleBlockRenderingHandler

  • Like 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
Just now, Draco18s said:

Not really.

Damn.

 

Just now, Draco18s said:

But I do know you'll be interested in ISimpleBlockRenderingHandler

Yeah, I've figured that much out, unfortunately most of the information related to it is basically black GL magic to me tbqh.

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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