StellarSky icon indicating copy to clipboard operation
StellarSky copied to clipboard

Varying longitude and latitude

Open dexman545 opened this issue 10 years ago • 7 comments

Hello, I was wondering if it would be possible to make longitude/latitude vary based upon the players position. Personally, I think it would be a very awesome thing to have, and would add a lot to the depth of the mod. I have figured out the calculations for converting player coords to degrees, based on TerraFirmaCrafts system, and the system they provided on their wiki (z=0 is the equator, +/- 30000 is the arctic circle. http://wiki.terrafirmacraft.com/Coordinates I also used TFC because a) it has a very good system for figuring climes that works well with MC, and b) I use it in a modpack for 1.7 with stellar sky).

Lattitude: (((Z / -1,000) * 250) / 10,002) * 90 = Degrees North. Simplified: Z * 0.0022495501 = Degrees North Longitude: (((X / -1,000) * 250) / 10,002) * -90 = Degrees East. Simplified: X * 0.0022495501 = Degrees East

Thank you, Dex

dexman545 avatar Jan 13 '16 02:01 dexman545

It is impossible, sadly, because one world can only have one celestial angle..

Abastro avatar Jan 13 '16 07:01 Abastro

yes, but since the mod is client-side only, can't the celestial angle be updated periodically, and the skybox redrawn? It wouldn't even have to be updated every block traveled by the player....every 500 blocks translates to about a 1.1 degree shift, so the calculation only really needs to occur when the player crosses that 500 (or 1000) block boundary, and even then, the angular differences aren't all that small to cause major visual differences. Using the 1000 block example, if the player is within 500 blocks to the main line (say, 2000), then the calculation will only be done for the 2000 coord, until they are more than 500 blocks away (2501), at which point it then uses the calc for the 3000 coord. This creates bands of 1000 block width where all players in that band have the same skybox, but those outside that band have a different one.

dexman545 avatar Jan 14 '16 00:01 dexman545

This mod is not only for SSP, but also SMP. On SMP if celestial angle differs on client, one will see mobs spawning on day because it is day on server.

Abastro avatar Jan 14 '16 09:01 Abastro

So both the longitude, and the latitude change the time? IRL, timezones are dependent on longitude, and run pole to pole, or is this function in simulation of something else?

dexman545 avatar Jan 14 '16 23:01 dexman545

Yes. The two are involved in skylight and celestial angle.

Abastro avatar Jan 16 '16 10:01 Abastro

Left this open as possible future feature.

Abastro avatar Jan 31 '16 02:01 Abastro

its 2022 lmao

Pinecone6442 avatar Nov 21 '22 02:11 Pinecone6442