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.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I started two worlds and I ran into the same problem on both of them. Both times my game froze after looting a chest on a ship from the ''When Dungeons Arise'' Mod. I assumed it was because of the sudden amount of achievements even tho that wasnt a problem in the past (my pc is pretty bad). But when I join the world it says ''joining world'' then I just see the unloaded world for a few seconds, so nothing but void. Then it says ''Loading terrain...'' as if i stepped in a portal. On the top right appears a message of a skill tree mod for a split second before the game then crashes. This happens every time for whatever reason on both worlds now. This is the crash report I got: The game crashed whilst unexpected error Error: java.lang.IncompatibleClassChangeError: Expecting non-static method 'void net.minecraft.client.gui.GuiComponent.m_93228_(com.mojang.blaze3d.vertex.PoseStack, int, int, int, int, int, int)' The link for the debug.log: https://paste.ee/p/u3eou# The link for the crash report: https://paste.ee/p/iBYik Dont know what helps here as info so heres a list of the mods. Advancement Plaques [Neo/Forge] AmbientSounds 6 Anvil Never Too Expensive AppleSkin Aquamirae (Forge) AttributeFix Balm Better Advancements Better Than Mending Bookshelf Born in Chaos Caelus API (Forge/NeoForge) Charm of Undying (Fabric/Forge/Quilt) Citadel Clumps Collective Colorful Hearts CorgiLib CraftPresence CreativeCore Curios API (Forge/NeoForge) DisenchantingForge Double Doors Easy Anvils [Forge & Fabric] EASY CRAFT Easy Experience Easy Piglins Easy Villagers Elytra Slot (Fabric/Forge/Quilt) Enchantment Descriptions End Remastered [NeoForge/Fabric] Enhanced Celestials - Blood, Blue, & Harvest (Super) Moons Equipment Compare [Neo/Forge] Even More Instruments! Forgiving Void GeckoLib Genshin Instruments Iceberg [Neo/Forge] Inventory HUD+ Item Highlighter [Neo/Forge] Jade 🔍 Jumpy Boats Just Enough Items (JEI) Just Zoom KleeSlabs Konkrete [Forge/NeoForge] L_Ender 's Cataclysm Legendary Tooltips [Neo/Forge] Majrusz Library Majrusz's Enchantments Mouse Tweaks Neat Obscure API (Forge) Overloaded Armor Bar Prism [Neo/Forge] Pufferfish's Skills [Fabric & Forge & NeoForge] Puzzles Lib [Forge & Fabric] Responsive Shields Royal Variations Savage Ender Dragon[Forge/Fabric] Structory: Towers Traveler's Backpack UniLib Upgraded Core Upgraded Netherite Upgraded Netherite : Ultimerite Vein Mining (Fabric/Forge/Quilt) When Dungeons Arise - Forge! When Dungeons Arise - Seven Seas Xaero's Minimap Xaero's World Map YUNG's API (Forge) YUNG's Better End Island (Forge) YUNG's Better Strongholds (Forge)
    • Make a test with another Launcher like MultiMC or AT Launcher
    • I'm playing on a Mac and when I launch from the normal forge launcher I get a GLFW error. So i'm using the Prism Launcher with java 8 trying to be able to make it run on a Mac. I've looked online but I keep getting hit with these logs and i'm not sure what to do. Log: https://mclo.gs/OVzhZtd
    • Make some tests with other Quest Giver builds https://www.curseforge.com/minecraft/mc-mods/quest-giver/files/all?page=1&pageSize=20&version=1.18.2
  • Topics

×
×
  • Create New...

Important Information

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