Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
Only send empty chunk when player is dead
Currently not needed at all with chunk rewrites not yet updated, but considering it's only actually needed for dead players, no need to fuck up a chunk without the future applied patch
Dieser Commit ist enthalten in:
Ursprung
44ccc15a30
Commit
d1e1217a01
@ -10,20 +10,23 @@ 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.
|
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
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 6951b8e320dcea2c2ce4271ed03a20c729ff503b..9110288a30c02e69eb5978f433fd7098ae7a955a 100644
|
index 6951b8e320dcea2c2ce4271ed03a20c729ff503b..4010cf5f262999575bb54066a7f63ed422afc572 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -422,6 +422,13 @@ public abstract class PlayerList {
|
@@ -422,6 +422,16 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
// Paper start - move vehicle into method so it can be called above - short circuit around that code
|
// Paper start - move vehicle into method so it can be called above - short circuit around that code
|
||||||
onPlayerJoinFinish(player, worldserver1, s1);
|
onPlayerJoinFinish(player, worldserver1, s1);
|
||||||
+ // Send empty chunk, so players aren't stuck in the world loading screen
|
+ // 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)
|
+ 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);
|
+ .getHolderOrThrow(net.minecraft.world.level.biome.Biomes.PLAINS);
|
||||||
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
|
+ player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
|
||||||
+ new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
|
+ new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
|
||||||
+ worldserver1.getLightEngine(), null, null, true, false)
|
+ worldserver1.getLightEngine(), null, null, true, false)
|
||||||
+ );
|
+ );
|
||||||
|
+ }
|
||||||
|
+ // Paper end
|
||||||
}
|
}
|
||||||
private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) {
|
private void mountSavedVehicle(ServerPlayer player, ServerLevel worldserver1, CompoundTag nbttagcompound) {
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 9110288a30c02e69eb5978f433fd7098ae7a955a..5134af3c96b8df8534db543971c1d574eec31f55 100644
|
index 4010cf5f262999575bb54066a7f63ed422afc572..f79c4212a5a3f564d00749f21e32639096c3257a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1446,7 +1446,7 @@ public abstract class PlayerList {
|
@@ -1449,7 +1449,7 @@ public abstract class PlayerList {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
|
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
|
||||||
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
|
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren