The Aether II

The Aether II

6M Downloads

Bug: Skyroot Beds (and /weather command) not clearing weather

VaraHunter682 opened this issue ยท 3 comments

commented

What Feature Types Apply to This Bug?

World-Gen

Other Type

No response

What Type of Bug Is This?

Unexpected Behavior

Forge Version

20.4.234

The Aether II Version

1.20.4-001

Is This Bug a Conflict With Another Mod?

No response

Client Log

No response

Crash Report (if applicable)

No response

Steps to Reproduce

wait for it to rain/snow, then type "/weather clear" in chat or sleep in a Skyroot Bed

What You Expect To Happen

Based on Vanilla behavior, this should've cleared the weather.

What Actually Happened

Both do nothing, it still rains.

Additional Details

No response

Please Read and Confirm The Following

  • I have confirmed this bug can be replicated without the use of Optifine.
  • I have confirmed this bug is on the most recently supported version of Minecraft.
  • I have confirmed the details provided in this report are concise as possible and does not contained vague information (ie. Versions are properly recorded, answers to questions are clear).
  • I have confirmed this issue is unique and has not been reported already.
commented

You need to write /execute in minecraft:overworld run weather clear. This seems to be a hardcoded Vanilla flaw (I think) so we might need to add a new command

commented

ah ok

commented

code to add

    public static Long finishSleep(LevelAccessor level, long newTime) {
        if (level instanceof ServerLevel && level.dimensionType().effectsLocation().equals(AetherDimensions.AETHER_DIMENSION_TYPE.location())) {
            ServerLevelAccessor serverLevelAccessor = (ServerLevelAccessor) level;
            serverLevelAccessor.aether$getServerLevelData().setRainTime(0);
            serverLevelAccessor.aether$getServerLevelData().setRaining(false);
            serverLevelAccessor.aether$getServerLevelData().setThunderTime(0);
            serverLevelAccessor.aether$getServerLevelData().setThundering(false);

            long time = newTime + 48000L;
            return time - time % (long) AetherDimensions.AETHER_TICKS_PER_DAY;
        }
        return null;
    }```