Jump to content

[1.8.9] Overlaying vanilla stone texture with custom overlay [Solved]


Recommended Posts

Posted

Hello,

 

In 1.7.10 I used an

ISBRH

to render the vanilla stone block, then rendering an overlay on the stone texture and dynamically color the overlay based on the block's metadata. Now I am wondering if it is possible to do something like that using the new model system in 1.8, or do I have to make all the textures by hand for each possible state?

 

- larsgerrits

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Look at the vanilla

grass

model, it overlays a texture on each side that's coloured from

BlockGrass#colorMultiplier

. The important part is the

tintindex

value for each quad, which tells Minecraft to colour it (this is passed as the

renderPass

argument).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Wow, I totally forgot about the grass block...

 

Also, right now there is this in the log:

[17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=nickel not found
[17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=lead not found
[17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=tin not found
[17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=copper not found
[17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#inventory not found
[17:16:21] [Client thread/ERROR] [FML]: Model definition for location minetech:ores#metal=aluminium not found

I want every block to use the same texture, but only change it's color using the

colorMultiplier

method. So I looked around, and I think I have to use 'state mappers' to point every

IBlockState

to the same model instead of it looking for all different models in the blockstate file. Am I right in that? If so, how do I use those 'state mappers'?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

If you want every variant to use the same model with a different colour multiplier, you can either use Forge's blockstates format and specify the model in the

defaults

section or register a state mapper (which maps each

IBlockState

to a blockstates file and variant specified by a

ModelResourceLocation

).

 

To create a state mapper that ignores a specific property, create an instance of

StateMap.Builder

, call

StateMap.Builder#ignore

with the property and then call

StateMap.Builder#build

to create the

StateMap

. To register a state mapper, call

ModelLoader#setCustomStateMapper

in preInit.

 

I have various examples of Forge's blockstates format here.

 

I have some examples of state mappers that ignore properties here.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.