Sign in to follow this  
CoolBeans

Colored Lighting

Recommended Posts

I think it would real awesome if someone could make a colored lighting mod kinda like this, because the fact that there are pretty much 3 shades of light (night/day/redstone) really bothers me for some reason.

Share this post


Link to post
Share on other sites

You linked to a video of someone showing off a colored lighting mod. Your request is for a colored lighting mod. What am I missing here?

Share this post


Link to post
Share on other sites

I think eloraam has talked about how this would be... more than pretty incompatible with lots of things. One of her EAQs is why don't the various lumar lamps cast the correct shade of light, and her answer was it would require a major overhaul of the minecraft lighting engine. Possible, but not necessarily desirable.

"You should make lights shine the color that they are.”

I wanted to, and when I saw 1.8 the first time, I thought that Notch had actually added colored light. Instead, he moved to a new system of multitexturing for light level code (basically using a second texture where the coordinates are torchlight and sunlight levels), which actually makes it much, much more difficult to ever make this happen. It would now take not just a complete rewrite, but also a redesign, of the lighting code.

Share this post


Link to post
Share on other sites

You linked to a video of someone showing off a colored lighting mod. Your request is for a colored lighting mod. What am I missing here?

Well first off its from February last year and the mod is updated anymore. Plus that was the only colored light mod that I could find... I'm not stupid enough to go around asking for already made mods especially here.

I think eloraam has talked about how this would be... more than pretty incompatible with lots of things. One of her EAQs is why don't the various lumar lamps cast the correct shade of light, and her answer was it would require a major overhaul of the minecraft lighting engine. Possible, but not necessarily desirable.

Well if someone had the time could they please make this :P

Share this post


Link to post
Share on other sites

Well if someone had the time could they please make this :P

I think you are missing what Eloraam was saying there. That is not a "if someone has time" sort of thing. In order to make that work would involve a complete re-write of an entire, significant, portion of the minecraft base code. Anything that had anything to do with lighting (e.g. furnaces casting light while they are working, the laser mod, regular torches, etc.) would also have to be completely re-written. Before the change to the 1.8 lighting engine this sort of mod was pretty easy to do actually. Since then it is impossible from a feasibility standpoint to do anything more than make a colored block that sheds white light.

edit: Just to make it even more clear, doing this would basically make almost every mod involving any sort of light at al inherently incompatible, and ones that did not would be highly unpredictable.

Share this post


Link to post
Share on other sites

I think you are missing what Eloraam was saying there. That is not a "if someone has time" sort of thing. In order to make that work would involve a complete re-write of an entire, significant, portion of the minecraft base code. Anything that had anything to do with lighting (e.g. furnaces casting light while they are working, the laser mod, regular torches, etc.) would also have to be completely re-written. Before the change to the 1.8 lighting engine this sort of mod was pretty easy to do actually. Since then it is impossible from a feasibility standpoint to do anything more than make a colored block that sheds white light.

edit: Just to make it even more clear, doing this would basically make almost every mod involving any sort of light at al inherently incompatible, and ones that did not would be highly unpredictable.

Would there be a way to add it to a mod like modloader for instance so that any mod that works with modloader will also work for the mod?

Share this post


Link to post
Share on other sites

Would there be a way to add it to a mod like modloader for instance so that any mod that works with modloader will also work for the mod?

I think there's some confusion here on how ModLoader works...I'm inclined to take the word of some brilliant programmers when they say it'll be next to impossible without a large rewrite.

Share this post


Link to post
Share on other sites

I think there's some confusion here on how ModLoader works...I'm inclined to take the word of some brilliant programmers when they say it'll be next to impossible without a large rewrite.

I know how modloader works but I'm saying a colored lighting mod, which allows mods to use colored lighting, was bundled with modloader (hypothetically speaking) then would it be possible? If it wouldn't... well fuck.

Share this post


Link to post
Share on other sites

No, you would not be able to add it like a mod loader mod.

Mod Loader and Forge work by adding hooks, segments of programming that allow you to write a bit of code without having to change the base files. Then in your code you just use the appropriate method and your code is seamlessly injected into the minecraft memory dump, which is just how Java works.

In order to add those hooks, someone would have to add a modloader hook or a Forge hook (more likely because of the level of change we are talking), but in order to do that forge hook you would still need to do a complete overhaul of the lighting system. So ultimately, back to square one.

Sorry, but from a coding perspective, it would be more worth someone's time to just make a completely new game engine than try and change the MC one to support this kind of lighting.

Share this post


Link to post
Share on other sites

No, you would not be able to add it like a mod loader mod.

Mod Loader and Forge work by adding hooks, segments of programming that allow you to write a bit of code without having to change the base files. Then in your code you just use the appropriate method and your code is seamlessly injected into the minecraft memory dump, which is just how Java works.

In order to add those hooks, someone would have to add a modloader hook or a Forge hook (more likely because of the level of change we are talking), but in order to do that forge hook you would still need to do a complete overhaul of the lighting system. So ultimately, back to square one.

Sorry, but from a coding perspective, it would be more worth someone's time to just make a completely new game engine than try and change the MC one to support this kind of lighting.

or you could just have the rewrite packaged with forge, with some easy hooks to make coloured light and casting light easy, and then it wouldn't require huge rewrites of mod's codes, it would just require them to use a forge hook instead of notch's weird ass programming. Not sure if that would fuck over the laser mod or anything like that though. There also comes the problem of smooth lighting with coloured lights too.

Share this post


Link to post
Share on other sites

Step 1: Open RenderBlocks.java.

Step 2: Realize this entire file does nothing but simply draw blocks and nothing else.

Step 3: Observe that this file is over five thousand lines long.

Step 4: Notice that there are separate functions for each individual face of each regular block.

Step 5: ???

Step 6: Give up and find something better to do with your time than try to fix Minecraft lighting.

Share this post


Link to post
Share on other sites

wait he wants technic?

This is the the best sentence in this thread, ever.

I did open up RenderBlocks.java, and what i found there was complete gibberish.

ALL THAT FOR 6 FACES?!

dafuq

Share this post


Link to post
Share on other sites

This is the the best sentence in this thread, ever.

I did open up RenderBlocks.java, and what i found there was complete gibberish.

ALL THAT FOR 6 FACES?!

dafuq

Notice the fact that half of the code is for traditional color-multiplier lighting, and the other half is for AO (smooth, new-style) lighting. Also notice that none of this is in reusable functions: Everything is written out verbatim, hand-coded. And no, that's not just the result of decompiling inlined functions, because Java doesn't discard method information.

Share this post


Link to post
Share on other sites

If I know enough Java,

He could just make one method, with tons of unknowns, like x for block face, y for colour etc.

At least I think it could be achieved...

Share this post


Link to post
Share on other sites

Yes, it could, and would be the way an actual programmer (versus a hobbyist) would do it.

Want another chuckle? Check out the Explosion class. That's right: Single-occurence explosions are instantiated and tossed around instead of a nice static method.

Share this post


Link to post
Share on other sites

Here's an idea I've been tossing around in my head recently, if notch can implement biome colors to grass wouldn't we be able to implement a lighting colour to be emitted by the block that then overrides notches shading with the same shade just of that color?

For example, where it says to put a shade over the blocks texture, this shade will be dependent on what the current light colour for that area is.

Share this post


Link to post
Share on other sites

Here's an idea I've been tossing around in my head recently, if notch can implement biome colors to grass wouldn't we be able to implement a lighting colour to be emitted by the block that then overrides notches shading with the same shade just of that color?

For example, where it says to put a shade over the blocks texture, this shade will be dependent on what the current light colour for that area is.

Sure, but you'd have to do it on a block-by-block basis, it would be limited to a single shade pattern per block, and would break any-and-all mods that use that block unless you did some very complex replacement in Block.blocksList and overrode/reimplemented everything (which then might break worlds if your mod is disabled).

Share this post


Link to post
Share on other sites

Ok here it is minecraft does not and probs cannot have coloured lighting but i have made a mod which makw the most of how minecraft draws it faces just search coloured lights now i am working on the light spreading but what eloraam means is to get true coloured lighting you are looking at a rewrite of all the lightinh code to factor for different light and my mod which is updating soon to having spreading lighta has more then about 3 hundred lines of ode or one face of the block but i am spending time on it and if you want i am willing to when done maybe realease source to the forge team but for now i am saying a mod does excist (my mod) and it will be updated soon so there u go it is not real coloured lighting but fake coloured lighting!! Sorry bout spelling i am on phone!!

Share this post


Link to post
Share on other sites

For the love of god, use punctuation. I could not make it halfway through your post before feeling dizzy, so I stopped and don't care.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this