SchmarrnDevs / Lighty

The Light Overlay Mod with a twist!
https://modrinth.com/mod/lighty
Apache License 2.0
10 stars 8 forks source link

[Suggestion] Showing the location best for the next light source #54

Open WildFyr16 opened 3 months ago

WildFyr16 commented 3 months ago

What would this do?

This would have a custom coloured square (Maybe blue?) At the perfect distance from the last green square to place another torch. This would be helpful to players who just want to light up an area just enough to stop spawning without using too many torches. (for example, under a build or a mine area) I have also included a mockup of how I would think this would work. (I am aware that different light sources give off a different amount of light, however I think as torches are the most commonly used light source to light up things like under builds and in mines because of their easy to acquire nature I think their 13 block radius should be the one taken into account here.)

Mockup

andi-makes commented 3 months ago

Thank you for your suggestion!

While on a 2D-plane, this seems simple, it gets way more difficult to do correctly when there are obstacles on that 2D-plane, and even more difficult when considering the complex 3D world of Minecraft.

I'm not sure if there even is a performant and correct way of solving this kind of problem. The obvious solution of just calculating the distance to the next light source is already quite resource intensive and wrong because it doesn't take any obstacles into account.

Again, thank you for your suggestion, and I highly appreciate the work you've put into your mockup! Maybe someday I'll tackle it, or someone else does, who knows :)