CoolBeans Posted May 30, 2012 Posted May 30, 2012 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. Quote
jakj Posted May 30, 2012 Posted May 30, 2012 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? Quote
gotyaoi Posted May 30, 2012 Posted May 30, 2012 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. Quote
CoolBeans Posted May 30, 2012 Author Posted May 30, 2012 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 Quote
PringleMan Posted May 31, 2012 Posted May 31, 2012 Well if someone had the time could they please make this 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. Quote
CoolBeans Posted May 31, 2012 Author Posted May 31, 2012 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? Quote
Torezu Posted May 31, 2012 Posted May 31, 2012 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. Quote
CoolBeans Posted June 1, 2012 Author Posted June 1, 2012 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. Quote
PringleMan Posted June 1, 2012 Posted June 1, 2012 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. Quote
miniboxer Posted June 1, 2012 Posted June 1, 2012 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. Quote
jakj Posted June 1, 2012 Posted June 1, 2012 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. masterzh 1 Quote
TheGuy Posted June 1, 2012 Posted June 1, 2012 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 Quote
jakj Posted June 1, 2012 Posted June 1, 2012 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. Quote
TheGuy Posted June 1, 2012 Posted June 1, 2012 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... Quote
jakj Posted June 1, 2012 Posted June 1, 2012 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. Quote
TheGuy Posted June 5, 2012 Posted June 5, 2012 I think the real question is why notch fails to code perfectly. I now blame him for the lag I am caused. Quote
Sheldor Posted June 8, 2012 Posted June 8, 2012 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. Quote
jakj Posted June 9, 2012 Posted June 9, 2012 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). Quote
Ducksarebest Posted June 17, 2012 Posted June 17, 2012 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!! Quote
jakj Posted June 17, 2012 Posted June 17, 2012 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. Quote
Ducksarebest Posted June 17, 2012 Posted June 17, 2012 Sorry I Was On My Phone! And Here Is The Mod: http://www.minecraftforum.net/topic/1283492-125-coloured-lights-mod/ Quote
CptSpaceToaster Posted December 11, 2013 Posted December 11, 2013 I've got a different implementation, take it as you will: http://www.minecraftforum.net/topic/1993130-wip164-betacolored-light-progress-and-discussion/#entry24515141 Source: https://github.com/CptSpaceToaster/CptsModdingLight Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.