Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 12:30:06 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
33 Zeilen
2.1 KiB
Diff
33 Zeilen
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
|
Date: Wed, 2 Mar 2022 09:45:56 +0100
|
|
Subject: [PATCH] Force close world loading screen
|
|
|
|
Dead players would be stuck in the world loading screen and other players may
|
|
miss messages and similar sent in the join event if chunk loading is slow.
|
|
Paper already circumvents falling through the world before chunks are loaded,
|
|
so we do not need that. The client only needs the chunk it is currently in to
|
|
be loaded to close the loading screen, so we just send an empty one.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
index 133bf27e301aa5815cc7d7e275b2b08cdc6e4392..f29700d1a7cfebbe4a54b06470ab73d1522c5dd0 100644
|
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
|
@@ -429,6 +429,16 @@ public abstract class PlayerList {
|
|
|
|
// Paper start - move vehicle into method so it can be called above - short circuit around that code
|
|
onPlayerJoinFinish(player, worldserver1, s1);
|
|
+ // Paper start - Send empty chunk, so players aren't stuck in the world loading screen with our chunk system not sending chunks when dead
|
|
+ if (player.isDeadOrDying()) {
|
|
+ net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> plains = worldserver1.registryAccess().registryOrThrow(net.minecraft.core.Registry.BIOME_REGISTRY)
|
|
+ .getHolderOrThrow(net.minecraft.world.level.biome.Biomes.PLAINS);
|
|
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
|
|
+ new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
|
|
+ worldserver1.getLightEngine(), null, null, true, false)
|
|
+ );
|
|
+ }
|
|
+ // Paper end
|
|
}
|
|
private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) {
|
|
// Paper end
|