Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Hi, I'm making the Stellarium mod, which changes minecraft into configurable universe.

I want to make the minecraft world sphere,

but I realized that full minecraft code is designed for planar minecraft world.

 

What I have to do is only changing the direction of sun via coordinates,

but the 'getCelestialAngle' method returns constant for every coordinates..

 

Then can I hook the Light-level calculation, etc.?

or are there any other ways?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

How you even make a 2D grid of squares represent a sphere?

 

Pretty much all the code that cares about the sun, moon and light assumes a flat world, with the values being the same at a given point in time for the entire world. So there really is no hooks to cover everything that is needed, and you will have to modify lots of core classes (not sure what best practice is there in terms of Forge. Ideally I guess you would want to override/replace specific functions, not entire class files to replace the normal minecraft/forge ones, either way you have to be very careful to support multiple Forge versions, and things like MCPC+ which are also changing these files).

 

So I suggest you look at every place that cares, and see what you can do to make it different. You can likely implement other improvements to Minecraft that would be nice as a seperate permissive mod, e.g. the ability to have the moon and sun follow different orbits, to have seasons (variable daylength), and for localised weather (storms only need to reduce light within a certain area, not globally).

 

Some of the code that cares uses stuff like "World.getBlockLightValue(x,y,z)" so if you modify the relevant functions in World that should be enough. However there is also various bits of code, including some logic stuff as well as rendering that deal with the angle directly, which obviously means those bits need changing as well to take account of their location (or the players camera location in the case of rendering) in the world.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.