Jump to content

Recommended Posts

Posted

What I am thinking of adding to my mod is events that can happen like in Terraria such as a Blood Moon or Solar Eclipse. How would I go about doing this, and giving the sun/moon a different texture?

Posted

The world object contains an existing timer: getTotalWorldTime()

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Would I use WorldSaveData to save the events so that it would know that the event is still happening when rejoining the world? And something to check to see if the world has a blood moon or something else to use in other classes.

Posted

@OP

Yes, and basically you need to check them every tick. I recommend checking current tick using World#getWorldTime(). (Since it is used in most part, containing celestial calculation)

 

You need to set setSkyRenderer before the event starts, and revert it back when it finishes. you will need to copy RenderGlobal#renderSky and change parts that you need. (yes, just a 'sun/moon texture change' will need this, kinda overkill)

 

@Draco18s

getTotalWorldTime is for getting total world time, and I think World#getWorldTime will be better for these case. (Considering /time set command)

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

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

Posted

Yes, you are correct. I was mobile and not considering such things (more focused on winning a game of Fury of Dracula).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Is there any way to make it so that say, when the solar eclipse is happening, only custom mobs can spawn, and when say the blood moon is happening, it adds custom mobs to the spawn, and once they are over, it changes the spawns to normal. Also is there any way to increase spawn rates?

Posted

The entity class has a function called canSpawnHere or something similar.  That gives you access to the world, but that would be the method you would use to determine whether or not there's a solar eclipse.

 

If there isn't, return false.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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