MinecraftModDevelopmentMods / StellarSky

Stellar Sky, Real Constellations in Minecraft!
27 stars 13 forks source link

Varying longitude and latitude #16

Open dexman545 opened 8 years ago

dexman545 commented 8 years ago

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

Abastro commented 8 years ago

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

dexman545 commented 8 years ago

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.

Abastro commented 8 years ago

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.

dexman545 commented 8 years ago

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?

Abastro commented 8 years ago

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

Abastro commented 8 years ago

Left this open as possible future feature.

Pinecone6442 commented 1 year ago

its 2022 lmao