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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, I want to change some things about a specific mod. I made some small mods for myself before, but I don't know how to use other mods as a dependencie and add the repositories. My build.gradle file looks something like this:   repositories { flatDir { dirs 'libs' } } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation fg.deobf("libs:create-1.20.1:0.5.1.f") implementation fg.deobf("libs:create-stuff-additions1.20.1:2.0.4a") } I have the folder libs in my root folder. If I start the gradlew.exe, I get the following output: > Configure project : Java: 17.0.15, JVM: 17.0.15+6 (Eclipse Adoptium), Arch: amd64 files(...) dependencies are not deobfuscated. Use a flatDir repository instead: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver Cannot deobfuscate dependency of type DefaultSelfResolvingDependency_Decorated, using obfuscated version! files(...) dependencies are not deobfuscated. Use a flatDir repository instead: https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver Cannot deobfuscate dependency of type DefaultSelfResolvingDependency_Decorated, using obfuscated version! I don't know why this warning occurs or how to fix it. If I try to build the whole thing, I get the same message, but this time as an error and the build process crashes. I looked at the gradle dependencies website (https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html), but everything I tried did not work.   I use the Minecaft version 1.20.1 and the Forge version 47.2.17. Both mods don't have other dependencies and work perfectly fine if I start the game normaly.   Can someone explain to me why it does not work and/or where I can get help? Something like a documentation would be enough.
    • im just going to play without shaders(my friends will be dissapointed)
    • crashed the game // Embeddium instance tainted by mods: [oculus] // Please do not reach out for Embeddium support without removing these mods first. // ------- // Why did you do that? flywheel is needed for oculus but when i go into mc it then says sodium is 0.5.3(rubidum fork of sodium ported to forge)
    • oh wait i think i found the error  rubidium wasnt installed for oculus . IT WAS RUBIDIUM????????????????????
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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