mirror of
				https://github.com/GeyserMC/Geyser.git
				synced 2024-08-14 23:57:35 +00:00 
			
		
		
		
	Bring in #4847 change
This commit is contained in:
		
							parent
							
								
									6299903ac3
								
							
						
					
					
						commit
						e994d6e1d6
					
				
					 1 changed files with 16 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -27,9 +27,11 @@ package org.geysermc.geyser.util;
 | 
			
		|||
 | 
			
		||||
import org.cloudburstmc.math.vector.Vector3f;
 | 
			
		||||
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.packet.ChangeDimensionPacket;
 | 
			
		||||
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.PlayerActionPacket;
 | 
			
		||||
import org.cloudburstmc.protocol.bedrock.packet.StopSoundPacket;
 | 
			
		||||
| 
						 | 
				
			
			@ -85,6 +87,20 @@ public class DimensionUtils {
 | 
			
		|||
        // Effects are re-sent from server
 | 
			
		||||
        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);
 | 
			
		||||
 | 
			
		||||
        // If the bedrock nether height workaround is enabled, meaning the client is told it's in the end dimension,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue