age-series / ElectricalAge

Electrical Age (ELN) is a Minecraft Mod offering the ability to perform large-scale in-game electrical simulations.
Other
66 stars 32 forks source link

Need help with custom light types (MV/HPS/MH etc.) #211

Closed Elgh-github closed 4 years ago

Elgh-github commented 4 years ago

First of all, sorry if this is in the wrong place, but i don't really know where else to ask. I'm currently making my own version of electrical age, with some improvements, balance changes, new blocks. etc.. I'm making gas discharge lamps (mercury vapor, high & low pressure sodium, metal halide.), and need different "type's" for them. types This and add that was what i added. After building, i loaded up the game. But after that none of the lights work, but they still consume power. What do i need to do to add new types of lights? And, can you please explain what do these values in the image below do and how to use them. Some of them i can figure out, but for example, what type of value do nominalLight and nominalLife take? gag Thanks in advance. Also, is light range limited to 15. I remembered that the game crashes with higher values.

voidsong-dragonfly commented 4 years ago

Yes, it is limited to 15.

jrddunbr commented 4 years ago

The lighting code is a shitshow. Good luck!

Seriously, the LampSocketProcess file in particular is what really got me started on the port for Minecraft 1.12, it as well as the rest of the lamp code really needs to just be completely rewritten, and due to limitations in Kotlin versions less than 1.3.61, I can't fix it the way I should. You'll notice comments about lines of code that should work but are completely broken in this older version of Kotlin.

Just a FYI that if you want to do purely client side stuff you want to stick mostly in the descriptors and in the render classes. Believe me though, it's not easy to modify the code and get something that isn't more buggy than when you started.

If you want to, I'm open to taking pull requests with changes back into this mod version. I'm just not going to be focusing future development on this branch (1.16.x ish) once I put the capstone on the projects I'm working at right now. The 1.7.10 development environment is very stale and at risk of being completely unusable.

Elgh-github commented 4 years ago

Yeah, after lot's of trying, i pretty much broke everything. I can make new bulbs of course, but making new types just broke it completely. So i'll stick with using the eco type for now. I'm going to try again sometime when i have more time. The bulbs i have made now, work, but only use lot's of power without producing any more light. (Since disharge lamps are most commonly 35w and up. )

jrddunbr commented 4 years ago

RIP.