Colored light

Started by JohnDgg on

Topic category: Help with modding (Java Edition)

Last seen on 08:28, 8. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Colored light

Can I make a colored light? Like it should be red, blue, green, etc.?

Last seen on 21:38, 5. Oct 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can create a block that…
Sun, 07/07/2024 - 20:53

You can create a block that is colored, but that emits regular orange/yellow light, but if you want a block to emit colored light, it is a lot harder.

I don't know how to actually do any of these solutions, but I would assume that there are four ways to go about this.

One would be to only play your mod with shaders that allow colored block lighting, then edit the files of your mod to have special compatibility and specify that your block emits colored light. This might be the easiest option, but you would need to find the right shaders, and use custom code or at least some text file manipulation to make it work.

A second option would be to find some mod that adds a framework or library for colored lighting, then go through a similar process as with shaders to use the other mod's framework to add colored lights, again, this would likely require complex file manipulation/custom code. I also don't know what mods exist, if any, for modern minecraft that have this feature as a framework that other mods can build off of.

The third and most difficult option would be to fully custom code it in, heavily modifying minecraft's rendering system without relying on any external sources. This is possibly the most flexible option and allows your mod to be fully independant, but it isn't going to be easy if you try this way, and as I mentioned before, I don't know how to actually do any of these methods, so I won't be able to help beyond this message.

The fourth and easiest option would be to have your light block place down other blocks nearby through a procedure, and have the other blocks be translucent and colored to simulate colored light, but this is not a very effective or good-looking workaround for something that ultimately requires custom coding in some form to be done well.