Jump to content

[Solved]Update the sky


ItsMartNotMert

Recommended Posts

So I am editing the worldTime but it seems the sky is only updating per 1 second. Is there a way to let the sky update manually?

 

 

    @SubscribeEvent
    public void methodName(TickEvent.WorldTickEvent event) {
        if(activated){
            if(event.world.getWorldTime() % 24000 > 0 && event.world.getWorldTime() % 24000 < 13000){
                activated = false;
            }
            else{
                event.world.setWorldTime(event.world.getWorldTime() + 10);
            }
        }


    }

Link to comment
Share on other sites

Also, you never set it back to 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.

Link to comment
Share on other sites

WorldTickEvent

only fires on the server. The server only synchronizes the time every 20 ticks (every second). Either send

SPacketTimeUpdate

to all players in the dimension manually, or also update the time on the client.

 

Note also that that

activated

field will not work properly as there are multiple dimensions active, but you only have one field.

Thanks, will do!

And yes I just thought about it too. I need to find a way of doing it on the world specified.

 

Also, you never set it back to false.

 

I do

Link to comment
Share on other sites

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.