GregTechCEu / GregTech

GregTech CE 1.12 fork continuing progression and development
GNU Lesser General Public License v3.0
252 stars 177 forks source link

[Suggestion] Change colors via CT #181

Closed Exzept1on closed 3 years ago

Exzept1on commented 3 years ago

Is your feature request related to a problem? Please describe. It wouldn't be bad if users could change the color of objects, as well as liquids (for example: ingots, rods), it would help add more flexibility, I think so. This problem has already been described on GitHub GTCE.

Describe the solution you'd like

The ability to change the color of an object or liquid using CraftTweaker.

Additional context https://github.com/GregTechCE/GregTech/issues/1691

TechLord22 commented 3 years ago

This should already be possible. I have been slowly investigating all CT support to see what needs fixing, and have not gotten to colors yet. If anything needs changing on GT's side, I'll do so accordingly.

Exzept1on commented 3 years ago

Well, at the moment it is possible to change colors, if so, how? Or will you add this feature later? P.S Just the translator translates very strangely and I don't understand some words.

brachy84 commented 3 years ago

setMaterialRGB(int materialRGB)

Exzept1on commented 3 years ago

setMaterialRGB(int materialRGB)

OK, it works with items(example: ingots), but can I use it for liquids?

It doesn't work :( image

TechLord22 commented 3 years ago

Try the 0x123ABC format (this is not your color). It does work for me. Also, this needs to be done in a default loader, not the gregtech one.

Exzept1on commented 3 years ago

Try the 0x123ABC format (this is not your color). It does work for me. Also, this needs to be done in a default loader, not the gregtech one.

It doesn't work :( image

image

TechLord22 commented 3 years ago

While I cannot test your new scripts in game at the moment, I have a pretty good idea of why you are crashing. FluidMaterial does not exist in CEu. Try removing that import.

I have yet to receive a game crash due to CT and CEu. So if it persists, something more complicated may be happening behind the scenes. I'll investigate.

Exzept1on commented 3 years ago

THIS WORKS! image Thanks!