Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-16 04:50:07 +01:00
Bring in #4847 change
Dieser Commit ist enthalten in:
Ursprung
6299903ac3
Commit
e994d6e1d6
@ -27,9 +27,11 @@ package org.geysermc.geyser.util;
|
|||||||
|
|
||||||
import org.cloudburstmc.math.vector.Vector3f;
|
import org.cloudburstmc.math.vector.Vector3f;
|
||||||
import org.cloudburstmc.math.vector.Vector3i;
|
import org.cloudburstmc.math.vector.Vector3i;
|
||||||
|
import org.cloudburstmc.protocol.bedrock.data.LevelEvent;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.PlayerActionType;
|
import org.cloudburstmc.protocol.bedrock.data.PlayerActionType;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.ChangeDimensionPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.ChangeDimensionPacket;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.ChunkRadiusUpdatedPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.ChunkRadiusUpdatedPacket;
|
||||||
|
import org.cloudburstmc.protocol.bedrock.packet.LevelEventPacket;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.MobEffectPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.MobEffectPacket;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.PlayerActionPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.PlayerActionPacket;
|
||||||
import org.cloudburstmc.protocol.bedrock.packet.StopSoundPacket;
|
import org.cloudburstmc.protocol.bedrock.packet.StopSoundPacket;
|
||||||
@ -85,6 +87,20 @@ public class DimensionUtils {
|
|||||||
// Effects are re-sent from server
|
// Effects are re-sent from server
|
||||||
entityEffects.clear();
|
entityEffects.clear();
|
||||||
|
|
||||||
|
// Always reset weather, as it sometimes suddenly starts raining. See https://github.com/GeyserMC/Geyser/issues/3679
|
||||||
|
LevelEventPacket stopRainPacket = new LevelEventPacket();
|
||||||
|
stopRainPacket.setType(LevelEvent.STOP_RAINING);
|
||||||
|
stopRainPacket.setData(0);
|
||||||
|
stopRainPacket.setPosition(Vector3f.ZERO);
|
||||||
|
session.sendUpstreamPacket(stopRainPacket);
|
||||||
|
session.setRaining(false);
|
||||||
|
LevelEventPacket stopThunderPacket = new LevelEventPacket();
|
||||||
|
stopThunderPacket.setType(LevelEvent.STOP_THUNDERSTORM);
|
||||||
|
stopThunderPacket.setData(0);
|
||||||
|
stopThunderPacket.setPosition(Vector3f.ZERO);
|
||||||
|
session.sendUpstreamPacket(stopThunderPacket);
|
||||||
|
session.setThunder(false);
|
||||||
|
|
||||||
finalizeDimensionSwitch(session, player);
|
finalizeDimensionSwitch(session, player);
|
||||||
|
|
||||||
// If the bedrock nether height workaround is enabled, meaning the client is told it's in the end dimension,
|
// If the bedrock nether height workaround is enabled, meaning the client is told it's in the end dimension,
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren