Remove somewhat broken patch
With the new chunk system it doesn't hurt too much to (temporarily) remove this until implemented in a safer manner
Dieser Commit ist enthalten in:
Ursprung
e498ddaa61
Commit
d5f1ffc2e6
@ -1,280 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 19 Apr 2020 04:28:29 -0400
|
||||
Subject: [PATCH] Load Chunks for Login Asynchronously
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 62f1f568bba5fbcb68e49640adb79c9384619bc6..49ab59485e61f784701cf75b623ad2127e9fbe20 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -173,6 +173,7 @@ import org.bukkit.event.world.GenericGameEvent;
|
||||
import org.bukkit.event.world.TimeSkipEvent;
|
||||
// CraftBukkit end
|
||||
import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper
|
||||
+import it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet; // Paper
|
||||
|
||||
public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@@ -439,6 +440,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return player != null && player.level == this ? player : null;
|
||||
}
|
||||
// Paper end
|
||||
+ public final ReferenceOpenHashSet<ServerPlayer> pendingLogin = new ReferenceOpenHashSet<>(); // Paper
|
||||
|
||||
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
|
||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 78913368d8fa74273126a1245d2faf55242fccdd..d6200e09e0ca6fab8ecbfa5f21c52009b9959b77 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -184,6 +184,7 @@ public class ServerPlayer extends Player {
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||
public ServerGamePacketListenerImpl connection;
|
||||
+ public net.minecraft.network.Connection networkManager; // Paper
|
||||
public final MinecraftServer server;
|
||||
public final ServerPlayerGameMode gameMode;
|
||||
private final PlayerAdvancements advancements;
|
||||
@@ -260,6 +261,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean joining = true;
|
||||
public boolean sentListPacket = false;
|
||||
public boolean supressTrackerForLogin = false; // Paper
|
||||
+ public boolean didPlayerJoinEvent = false; // Paper
|
||||
public Integer clientViewDistance;
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/level/TicketType.java b/src/main/java/net/minecraft/server/level/TicketType.java
|
||||
index 97d1ff2af23bac14e67bca5896843325aaa5bfc1..e9bc61590d33dc341074371859ceec54599e6c47 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/TicketType.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/TicketType.java
|
||||
@@ -23,6 +23,7 @@ public class TicketType<T> {
|
||||
public static final TicketType<ChunkPos> FORCED = TicketType.create("forced", Comparator.comparingLong(ChunkPos::toLong));
|
||||
public static final TicketType<ChunkPos> LIGHT = TicketType.create("light", Comparator.comparingLong(ChunkPos::toLong));
|
||||
public static final TicketType<BlockPos> PORTAL = TicketType.create("portal", Vec3i::compareTo, 300);
|
||||
+ public static final TicketType<Long> LOGIN = create("login", Long::compareTo, 100); // Paper
|
||||
public static final TicketType<Integer> POST_TELEPORT = TicketType.create("post_teleport", Integer::compareTo, 5);
|
||||
public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1);
|
||||
public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index b42ef07a2653b62cf6ba44172e5a919be3de964f..6decd63fb773eab4ee06fe4bc0bc2659a1fa5388 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -339,6 +339,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
+ // Paper start - login async
|
||||
+ // Don't tick if not valid (dead), otherwise we load chunks below
|
||||
+ if (this.player.valid) {
|
||||
+ // Paper end
|
||||
if (this.ackBlockChangesUpTo > -1) {
|
||||
this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo));
|
||||
this.ackBlockChangesUpTo = -1;
|
||||
@@ -385,7 +389,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.lastVehicle = null;
|
||||
this.clientVehicleIsFloating = false;
|
||||
this.aboveGroundVehicleTickCount = 0;
|
||||
- }
|
||||
+ }} // Paper - end if (valid)
|
||||
|
||||
this.server.getProfiler().push("keepAlive");
|
||||
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 203786383387765d1f5a2d2ccce79d792fd5b187..82f2872cf32638a0df82fe751af4b634d8691c9c 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -84,7 +84,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
// Paper end
|
||||
} else if (this.state == ServerLoginPacketListenerImpl.State.DELAY_ACCEPT) {
|
||||
- ServerPlayer entityplayer = this.server.getPlayerList().getPlayer(this.gameProfile.getId());
|
||||
+ ServerPlayer entityplayer = this.server.getPlayerList().getActivePlayer(this.gameProfile.getId()); // Paper
|
||||
|
||||
if (entityplayer == null) {
|
||||
this.state = ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT;
|
||||
@@ -169,7 +169,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
}
|
||||
|
||||
this.connection.send(new ClientboundGameProfilePacket(this.gameProfile));
|
||||
- ServerPlayer entityplayer = this.server.getPlayerList().getPlayer(this.gameProfile.getId());
|
||||
+ ServerPlayer entityplayer = this.server.getPlayerList().getActivePlayer(this.gameProfile.getId()); // Paper
|
||||
|
||||
try {
|
||||
ServerPlayer entityplayer1 = this.server.getPlayerList().getPlayerForLogin(this.gameProfile, s); // CraftBukkit - add player reference
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index cfc497822e4e1dfc21807ec93bcfabb215cdbb95..2c0e45b3d0f5a1178ccecc851a110e5dc6f2023c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -143,6 +143,7 @@ public abstract class PlayerList {
|
||||
private final IpBanList ipBans;
|
||||
private final ServerOpList ops;
|
||||
private final UserWhiteList whitelist;
|
||||
+ private final Map<UUID, ServerPlayer> pendingPlayers = Maps.newHashMap(); // Paper
|
||||
// CraftBukkit start
|
||||
// private final Map<UUID, ServerStatisticManager> stats;
|
||||
// private final Map<UUID, AdvancementDataPlayer> advancements;
|
||||
@@ -186,6 +187,13 @@ public abstract class PlayerList {
|
||||
public void placeNewPlayer(Connection connection, ServerPlayer player) {
|
||||
player.isRealPlayer = true; // Paper
|
||||
player.loginTime = System.currentTimeMillis(); // Paper
|
||||
+ // Paper start
|
||||
+ ServerPlayer prev = pendingPlayers.put(player.getUUID(), player);
|
||||
+ if (prev != null) {
|
||||
+ disconnectPendingPlayer(prev);
|
||||
+ }
|
||||
+ player.networkManager = connection;
|
||||
+ // Paper end
|
||||
GameProfile gameprofile = player.getGameProfile();
|
||||
GameProfileCache usercache = this.server.getProfileCache();
|
||||
Optional<GameProfile> optional = usercache.get(gameprofile.getId());
|
||||
@@ -198,7 +206,7 @@ public abstract class PlayerList {
|
||||
if (nbttagcompound != null && nbttagcompound.contains("bukkit")) {
|
||||
CompoundTag bukkit = nbttagcompound.getCompound("bukkit");
|
||||
s = bukkit.contains("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s;
|
||||
- }
|
||||
+ }String lastKnownName = s; // Paper
|
||||
// CraftBukkit end
|
||||
|
||||
if (nbttagcompound != null) {
|
||||
@@ -225,11 +233,15 @@ public abstract class PlayerList {
|
||||
if (nbttagcompound == null) player.fudgeSpawnLocation(worldserver1); // Paper - only move to spawn on first login, otherwise, stay where you are....
|
||||
|
||||
player.setLevel(worldserver1);
|
||||
- String s1 = "local";
|
||||
+ // Paper start - make s1 final
|
||||
+ final String s1;
|
||||
|
||||
if (connection.getRemoteAddress() != null) {
|
||||
s1 = connection.getRemoteAddress().toString();
|
||||
+ } else {
|
||||
+ s1 = "local";
|
||||
}
|
||||
+ // Paper end
|
||||
|
||||
// Spigot start - spawn location event
|
||||
Player spawnPlayer = player.getBukkitEntity();
|
||||
@@ -272,6 +284,56 @@ public abstract class PlayerList {
|
||||
player.getRecipeBook().sendInitialRecipeBook(player);
|
||||
this.updateEntireScoreboard(worldserver1.getScoreboard(), player);
|
||||
this.server.invalidateStatus();
|
||||
+ // Paper start - async load spawn in chunk
|
||||
+ ServerLevel finalWorldserver = worldserver1;
|
||||
+ finalWorldserver.pendingLogin.add(player);
|
||||
+ int chunkX = loc.getBlockX() >> 4;
|
||||
+ int chunkZ = loc.getBlockZ() >> 4;
|
||||
+ final net.minecraft.world.level.ChunkPos pos = new net.minecraft.world.level.ChunkPos(chunkX, chunkZ);
|
||||
+ net.minecraft.server.level.ChunkMap playerChunkMap = worldserver1.getChunkSource().chunkMap;
|
||||
+ net.minecraft.server.level.DistanceManager distanceManager = playerChunkMap.distanceManager;
|
||||
+ io.papermc.paper.chunk.system.ChunkSystem.scheduleTickingState(
|
||||
+ worldserver1, chunkX, chunkZ, net.minecraft.server.level.ChunkHolder.FullChunkStatus.ENTITY_TICKING, true,
|
||||
+ ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.HIGHEST,
|
||||
+ (chunk) -> {
|
||||
+ MinecraftServer.getServer().scheduleOnMain(() -> {
|
||||
+ try {
|
||||
+ if (!playerconnection.connection.isConnected()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ PlayerList.this.postChunkLoadJoin(
|
||||
+ player, finalWorldserver, connection, playerconnection,
|
||||
+ nbttagcompound, s1, lastKnownName
|
||||
+ );
|
||||
+ distanceManager.addTicket(net.minecraft.server.level.TicketType.LOGIN, pos, 31, pos.toLong());
|
||||
+ } finally {
|
||||
+ finalWorldserver.pendingLogin.remove(player);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
+ public ServerPlayer getActivePlayer(UUID uuid) {
|
||||
+ ServerPlayer player = this.playersByUUID.get(uuid);
|
||||
+ return player != null ? player : pendingPlayers.get(uuid);
|
||||
+ }
|
||||
+
|
||||
+ void disconnectPendingPlayer(ServerPlayer entityplayer) {
|
||||
+ Component msg = Component.translatable("multiplayer.disconnect.duplicate_login");
|
||||
+ entityplayer.networkManager.send(new net.minecraft.network.protocol.game.ClientboundDisconnectPacket(msg), net.minecraft.network.PacketSendListener.thenRun(() -> {
|
||||
+ entityplayer.networkManager.disconnect(msg);
|
||||
+ entityplayer.networkManager = null;
|
||||
+ }));
|
||||
+ }
|
||||
+
|
||||
+ private void postChunkLoadJoin(ServerPlayer player, ServerLevel worldserver1, Connection networkmanager, ServerGamePacketListenerImpl playerconnection, CompoundTag nbttagcompound, String s1, String s) {
|
||||
+ pendingPlayers.remove(player.getUUID(), player);
|
||||
+ if (!networkmanager.isConnected()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ player.didPlayerJoinEvent = true;
|
||||
+ // Paper end
|
||||
MutableComponent ichatmutablecomponent;
|
||||
|
||||
if (player.getGameProfile().getName().equalsIgnoreCase(s)) {
|
||||
@@ -514,6 +576,7 @@ public abstract class PlayerList {
|
||||
|
||||
protected void save(ServerPlayer player) {
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
+ if (!player.didPlayerJoinEvent) return; // Paper - If we never fired PJE, we disconnected during login. Data has not changed, and additionally, our saved vehicle is not loaded! If we save now, we will lose our vehicle (CraftBukkit bug)
|
||||
this.playerIo.save(player);
|
||||
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
|
||||
|
||||
@@ -541,7 +604,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName())));
|
||||
- this.cserver.getPluginManager().callEvent(playerQuitEvent);
|
||||
+ if (entityplayer.didPlayerJoinEvent) this.cserver.getPluginManager().callEvent(playerQuitEvent); // Paper - if we disconnected before join ever fired, don't fire quit
|
||||
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
|
||||
|
||||
if (server.isSameThread()) entityplayer.doTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog)
|
||||
@@ -586,6 +649,13 @@ public abstract class PlayerList {
|
||||
// this.advancements.remove(uuid);
|
||||
// CraftBukkit end
|
||||
}
|
||||
+ // Paper start
|
||||
+ entityplayer1 = pendingPlayers.get(uuid);
|
||||
+ if (entityplayer1 == entityplayer) {
|
||||
+ pendingPlayers.remove(uuid);
|
||||
+ }
|
||||
+ entityplayer.networkManager = null;
|
||||
+ // Paper end
|
||||
|
||||
// CraftBukkit start
|
||||
// this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID())));
|
||||
@@ -603,7 +673,7 @@ public abstract class PlayerList {
|
||||
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
|
||||
// CraftBukkit end
|
||||
|
||||
- return playerQuitEvent.quitMessage(); // Paper - Adventure
|
||||
+ return entityplayer.didPlayerJoinEvent ? playerQuitEvent.quitMessage() : null; // CraftBukkit // Paper - Adventure // Paper - don't print quit if we never printed join
|
||||
}
|
||||
|
||||
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
|
||||
@@ -622,6 +692,13 @@ public abstract class PlayerList {
|
||||
list.add(entityplayer);
|
||||
}
|
||||
}
|
||||
+ // Paper start - check pending players too
|
||||
+ entityplayer = pendingPlayers.get(uuid);
|
||||
+ if (entityplayer != null) {
|
||||
+ this.pendingPlayers.remove(uuid);
|
||||
+ disconnectPendingPlayer(entityplayer);
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3ba07a7ba5300ac2b087c563355b4795ae33e27e..82e8d9e5a1a635926789b2fb9872bcfc3483217a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1246,7 +1246,7 @@ public final class CraftServer implements Server {
|
||||
return false;
|
||||
}
|
||||
|
||||
- if (handle.players().size() > 0) {
|
||||
+ if (handle.players().size() > 0 || handle.pendingLogin.size() > 0) { // Paper
|
||||
return false;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index c5a11e22c44d5adb55844bde964ca43acbc03fdf..632119d31b2c2821ef4871abf4fd6916668b0de7 100644
|
||||
index a49717ebf2b2d961b7f57dade57105bc9f16639c..e118a4a41c4c11c53b5a1783113f096bdb4a9f2d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2128,7 +2128,16 @@ public abstract class LivingEntity extends Entity {
|
@ -80,7 +80,7 @@ index 0a07a99e67e087db87c493d7c2b8b0c94d5b3771..19218e993052d44a830f825f9a0eb695
|
||||
|
||||
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 632119d31b2c2821ef4871abf4fd6916668b0de7..b6741c72216378368392e65aad3ff75a3191d0ce 100644
|
||||
index e118a4a41c4c11c53b5a1783113f096bdb4a9f2d..f0c37129240fadac40fec607afda1ccef446caa0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1647,9 +1647,9 @@ public abstract class LivingEntity extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a4a2e560304def17ab0943a2d876f6e8e521809b..f9c84bc2018391670d4e2dd97d0fca224cd1a728 100644
|
||||
index b42ef07a2653b62cf6ba44172e5a919be3de964f..792fdd57c0d31e5de4f5819d40677a53a84773d1 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -959,7 +959,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -955,7 +955,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@Override
|
||||
public void handlePickItem(ServerboundPickItemPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e28b973efe4f107d0a0d18dd2492f03ce2b424e9..c2e018cc05d6c6aaa615150ab4b62b85acfe1d05 100644
|
||||
index 3ba07a7ba5300ac2b087c563355b4795ae33e27e..760f42c620033aef43e4a7765dd7ba0b743a6ad4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -592,6 +592,13 @@ public final class CraftServer implements Server {
|
@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
|
||||
Set system properly at server startup if not set already to help protect from this.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 8fbc14fb4b38bb73439b0b5d31d29c69f1f229b2..6a9485f1c3743562700779930282285c6ad1067a 100644
|
||||
index 2451084f0d0bad43b7cf5c89f5590098f89b32a5..1176f77c79c2cbd727f1f6867e956fb698936349 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -28,6 +28,7 @@ public class Main {
|
@ -58,7 +58,7 @@ index d406df9626d29ee257b8eedcbea2af09ed4b6baf..366959f9841eb0ef3669b3b3b069d767
|
||||
this.running = false;
|
||||
if (waitForShutdown) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 82f2872cf32638a0df82fe751af4b634d8691c9c..8cb9606cf791d6f0e241cc92baa87988414d94e0 100644
|
||||
index 203786383387765d1f5a2d2ccce79d792fd5b187..8044885a91b316b2e5e92dd6260b8e515dcea5a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -183,6 +183,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
||||
@ -74,7 +74,7 @@ index 82f2872cf32638a0df82fe751af4b634d8691c9c..8cb9606cf791d6f0e241cc92baa87988
|
||||
this.connection.send(new ClientboundDisconnectPacket(ichatmutablecomponent));
|
||||
this.connection.disconnect(ichatmutablecomponent);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c2e018cc05d6c6aaa615150ab4b62b85acfe1d05..718126fbd5829ec6030d5fb2a75f6c8ce76059d7 100644
|
||||
index 760f42c620033aef43e4a7765dd7ba0b743a6ad4..ae5d775c00b377aa5be383874b4af61a5951186b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1015,6 +1015,7 @@ public final class CraftServer implements Server {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f9c84bc2018391670d4e2dd97d0fca224cd1a728..6936e9b671915fbc5d849adefa473906ed29ab95 100644
|
||||
index 792fdd57c0d31e5de4f5819d40677a53a84773d1..c5d1fc2e7c8090ed91cb6ca24135c5aaa2172fa9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1625,6 +1625,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1621,6 +1621,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<ClientboundPlayerPositionPacket.RelativeArgument> set, boolean flag) {
|
@ -515,10 +515,10 @@ index 549ea8e0fe702615eefcbfd1cd6a30e05b7b3fd5..771677c0e1cd7bfe089b9a5bb9095650
|
||||
paperConfigurations.initializeWorldDefaultsConfiguration();
|
||||
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 49ab59485e61f784701cf75b623ad2127e9fbe20..8d20f8beb9fd2da36a6cf8c16b1ad0315c321fc9 100644
|
||||
index 62f1f568bba5fbcb68e49640adb79c9384619bc6..44ca46e7dff19ae99ff6cf0d82269c5f7ad7274a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -220,7 +220,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final UUID uuid;
|
||||
public boolean hasPhysicsEvent = true; // Paper
|
||||
public static Throwable getAddToWorldStackTrace(Entity entity) {
|
||||
@ -529,7 +529,7 @@ index 49ab59485e61f784701cf75b623ad2127e9fbe20..8d20f8beb9fd2da36a6cf8c16b1ad031
|
||||
}
|
||||
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
@@ -1329,7 +1331,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1327,7 +1329,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (entity.isRemoved()) {
|
||||
// Paper start
|
||||
if (DEBUG_ENTITIES) {
|
||||
@ -556,7 +556,7 @@ index a24ef433d0c9d06b86fd612978cfd6d877036791..1b38326c9a709536dc4cccf9af93aede
|
||||
final MinecraftServer server;
|
||||
public volatile boolean running;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 8cb9606cf791d6f0e241cc92baa87988414d94e0..d92aaec3a4535d3683e842f9a712ba06c03014ef 100644
|
||||
index 8044885a91b316b2e5e92dd6260b8e515dcea5a9..75a32d33518023cb24ba639751631bfad3563bd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -185,7 +185,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@ -791,7 +791,7 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 889833bc7994973e1c5fb408b40ade69b445f8af..1ca964776e150b15270cf314ea6ed642f737641e 100644
|
||||
index ae5d775c00b377aa5be383874b4af61a5951186b..73bcba84979ba2d8f3ab2f2aa1d4294fe792f53a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2718,5 +2718,11 @@ public final class CraftServer implements Server {
|
@ -22,7 +22,7 @@ index 366959f9841eb0ef3669b3b3b069d7670f0ba7e6..93c1a1bf602af1e73202590e78dac833
|
||||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 3e48976a9f0317b02241ed9e313fbce1d373efe3..77d798a2c1a6fc7c171c07c103b54939e1aca497 100644
|
||||
index 73bcba84979ba2d8f3ab2f2aa1d4294fe792f53a..f6bc55e326f9076ac5df9decd7e501bee9346f67 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1024,6 +1024,35 @@ public final class CraftServer implements Server {
|
@ -18,7 +18,7 @@ index 05ac41e136da43284fb24a6b698ebd36318278fb..5ca3ad7b3d7606accd0a58b3c708fadb
|
||||
@VisibleForTesting
|
||||
static long encode(double value) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index eb08e086ee57a41de550dbae130a7d68562e1728..1da687083a52b97b6245185eb2e73380da5ae8fd 100644
|
||||
index 11a4ba46869e3073375d85820426f0662bd2caf7..69ac6b4fbdf4cebbaa36234e17e2d51c732de8af 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1337,9 +1337,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@ -42,7 +42,7 @@ index 2ba3bb4e5670ece798a8882801a856d82851c00a..a61f55ed1fbe5aac5289014cb95cb695
|
||||
this.newChunkHolder = newChunkHolder; // Paper - rewrite chunk system
|
||||
this.chunkToSaveHistory = null;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index f18df9d9e569bda32865a05e85a843f0422e17cf..d17a5b8d6f1b61ac1894e642d70704881c343f25 100644
|
||||
index 69ac6b4fbdf4cebbaa36234e17e2d51c732de8af..e87ade8697a33b9ea23dce59838a9ccd02ab09f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -156,12 +156,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@ -333,10 +333,10 @@ index 665e088cb0b73f6a0c62f29c56da462bab7c927e..298e4468f7b5346733257f7117f76c66
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 55705fca6dba1bebe0cb444a68c130f8f2785ae3..924969d5cb52e5361b6bf383a8ba6f63508dad6d 100644
|
||||
index 78913368d8fa74273126a1245d2faf55242fccdd..3fecc0c587de51c683a362a1a44fe3d5eed60979 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -266,6 +266,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -264,6 +264,7 @@ public class ServerPlayer extends Player {
|
||||
public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
|
||||
// CraftBukkit end
|
||||
public boolean isRealPlayer; // Paper
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker
|
||||
Use the distance map to find candidate players for tracking.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index eb3b54b5e01528e3801e9f15733bd5f3db56f17f..d1091b6b87534a3f9c2b8df74f40facc82679d80 100644
|
||||
index e87ade8697a33b9ea23dce59838a9ccd02ab09f6..81870f23ae70db3a1290428df6a47d76baa9a722 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -68,6 +68,7 @@ import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
|
@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside
|
||||
of the move call and into an appropriate place in the tick method.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 6936e9b671915fbc5d849adefa473906ed29ab95..dc10d5add00e77a2da761e806019785eb83d2bc6 100644
|
||||
index c5d1fc2e7c8090ed91cb6ca24135c5aaa2172fa9..fd3e8c2d3a415a6a3370784ec3c0d46d3c1122b7 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1438,6 +1438,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1434,6 +1434,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dc10d5add00e77a2da761e806019785eb83d2bc6..8f6ab03ade0e54f91d55dc54103f89425802aa42 100644
|
||||
index fd3e8c2d3a415a6a3370784ec3c0d46d3c1122b7..8d8a42003ac6de567db8c2e052d43d698879b535 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3096,9 +3096,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3092,9 +3092,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (!this.player.containerMenu.stillValid(this.player)) {
|
||||
ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
|
||||
} else {
|
@ -18,10 +18,10 @@ index aee5144bdc5bd9f7b07ce3b72331bcfd42663ec9..a98254e38076e82f94db7b2f2112500e
|
||||
return false;
|
||||
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 8f6ab03ade0e54f91d55dc54103f89425802aa42..9f095be14d7bb8495b09a10cad4d81dbcb7c3138 100644
|
||||
index 8d8a42003ac6de567db8c2e052d43d698879b535..30bb23dc4d190c00ced761ed3c8ab1e2620d3a0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -870,7 +870,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -866,7 +866,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
||||
@ -30,7 +30,7 @@ index 8f6ab03ade0e54f91d55dc54103f89425802aa42..9f095be14d7bb8495b09a10cad4d81db
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notAllowed"));
|
||||
} else {
|
||||
BaseCommandBlock commandblocklistenerabstract = null;
|
||||
@@ -937,7 +937,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -933,7 +933,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (!this.server.isCommandBlockEnabled()) {
|
||||
this.player.sendSystemMessage(Component.translatable("advMode.notEnabled"));
|
@ -76,10 +76,10 @@ index 771677c0e1cd7bfe089b9a5bb9095650216ff588..520cd1a6b347687b2ec6d13f034be391
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 924969d5cb52e5361b6bf383a8ba6f63508dad6d..39c3c4a5239c177ef81b13be1139300bb9af1dea 100644
|
||||
index 3fecc0c587de51c683a362a1a44fe3d5eed60979..ca08f04aed8296437eafee93093f96c03c1d418f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1151,7 +1151,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -1149,7 +1149,7 @@ public class ServerPlayer extends Player {
|
||||
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
|
||||
this.connection.send(new ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), this.gameMode.getGameModeForPlayer(), this.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), (byte) 3, this.getLastDeathLocation()));
|
||||
@ -89,10 +89,10 @@ index 924969d5cb52e5361b6bf383a8ba6f63508dad6d..39c3c4a5239c177ef81b13be1139300b
|
||||
|
||||
playerlist.sendPlayerPermissionLevel(this);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 9f095be14d7bb8495b09a10cad4d81dbcb7c3138..f440d9446d738429e33ed1fa9fa495af67f6427a 100644
|
||||
index 30bb23dc4d190c00ced761ed3c8ab1e2620d3a0a..f07b584d1d7a97e242c7699fa277d0c642da1857 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3371,7 +3371,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3367,7 +3367,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
|
||||
@ -102,7 +102,7 @@ index 9f095be14d7bb8495b09a10cad4d81dbcb7c3138..f440d9446d738429e33ed1fa9fa495af
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 77d798a2c1a6fc7c171c07c103b54939e1aca497..69cf645d88756c4b11942e07bdc41d56b6732825 100644
|
||||
index f6bc55e326f9076ac5df9decd7e501bee9346f67..a67e158bad42086aec237a822ec252fd26f80e3c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -964,8 +964,8 @@ public final class CraftServer implements Server {
|
||||
@ -117,7 +117,7 @@ index 77d798a2c1a6fc7c171c07c103b54939e1aca497..69cf645d88756c4b11942e07bdc41d56
|
||||
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
|
||||
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 3f7b277cd931a60d348802114ee2a1af02c479e0..72721a229f1febc23575ed994261efb1192a99d2 100644
|
||||
index caacf6dbe6c4fd461624ea421d08a18222fc2a6e..bc083d58f670f2a0c6e621da5e2258f7be5680b8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1146,7 +1146,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 69cf645d88756c4b11942e07bdc41d56b6732825..0b6f9567aaad080ff2a21be9e17a93d2d24fd010 100644
|
||||
index a67e158bad42086aec237a822ec252fd26f80e3c..829105771a06deca2a85e2f27b68d96c28c1218b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -373,7 +373,7 @@ public final class CraftServer implements Server {
|
||||
@ -44,7 +44,7 @@ index 69cf645d88756c4b11942e07bdc41d56b6732825..0b6f9567aaad080ff2a21be9e17a93d2
|
||||
this.printSaveWarning = false;
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 72721a229f1febc23575ed994261efb1192a99d2..f3723a8219881d55959e7231e230d28bfb521dcd 100644
|
||||
index bc083d58f670f2a0c6e621da5e2258f7be5680b8..f22457cf9dd5ceb6630c1f96a2050c350c4fbbc9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -281,8 +281,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -73,10 +73,10 @@ index 298e4468f7b5346733257f7117f76c66e9a1d8f0..d1652c237b2b272f0dfe80f774cff160
|
||||
public void close() throws IOException {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 8d20f8beb9fd2da36a6cf8c16b1ad0315c321fc9..629f7fb76fc0382235ca5c7f87121bf0092ec279 100644
|
||||
index 44ca46e7dff19ae99ff6cf0d82269c5f7ad7274a..95c53189e32aec6aca254fa3b157df7bc68d4d1a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1143,6 +1143,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1141,6 +1141,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
return !this.server.isUnderSpawnProtection(this, pos, player) && this.getWorldBorder().isWithinBounds(pos);
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ index 8d20f8beb9fd2da36a6cf8c16b1ad0315c321fc9..629f7fb76fc0382235ca5c7f87121bf0
|
||||
// Paper start - rewrite chunk system - add close param
|
||||
this.save(progressListener, flush, savingDisabled, false);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 1277eb92d5ed041d014e9b5bd5e2a1edbb73addf..b291903888b33eeae7347841f12a8ca49439c736 100644
|
||||
index ca08f04aed8296437eafee93093f96c03c1d418f..bb939f3312eb5a5740b445cfd268f1902955d4e8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -181,6 +181,7 @@ import org.bukkit.inventory.MainHand;
|
||||
@ -127,18 +127,18 @@ index 1277eb92d5ed041d014e9b5bd5e2a1edbb73addf..b291903888b33eeae7347841f12a8ca4
|
||||
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
|
||||
public ServerGamePacketListenerImpl connection;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 2c0e45b3d0f5a1178ccecc851a110e5dc6f2023c..b4e9462cbeec9ec8bd25b79839fde7d92410057f 100644
|
||||
index cfc497822e4e1dfc21807ec93bcfabb215cdbb95..c6b76049c70bf42c216d833b6dc33254c24b2253 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -577,6 +577,7 @@ public abstract class PlayerList {
|
||||
@@ -514,6 +514,7 @@ public abstract class PlayerList {
|
||||
|
||||
protected void save(ServerPlayer player) {
|
||||
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
|
||||
if (!player.didPlayerJoinEvent) return; // Paper - If we never fired PJE, we disconnected during login. Data has not changed, and additionally, our saved vehicle is not loaded! If we save now, we will lose our vehicle (CraftBukkit bug)
|
||||
+ player.lastSave = MinecraftServer.currentTick; // Paper
|
||||
this.playerIo.save(player);
|
||||
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
|
||||
|
||||
@@ -1181,10 +1182,22 @@ public abstract class PlayerList {
|
||||
@@ -1104,10 +1105,22 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
@ -30,7 +30,7 @@ index fac4097be2ee3d0bffbc92fb217f98831e78d6b3..233e372ba5d785352c9ac12dac37395b
|
||||
public CraftAttributeMap(AttributeMap handle) {
|
||||
this.handle = handle;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 4304ee35a9bd912c2ae4058febf22f0eea25adbd..4a91da3561d16995e8cfe04ebbc104da009a2503 100644
|
||||
index faa0d91713fb19820ca744f8c9449f79f44a55cb..d83ac28bd9147e33a838cf6250070fa0841f74b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -480,7 +480,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 4a91da3561d16995e8cfe04ebbc104da009a2503..c475ddea1c995df1dfcaf4f491f341761a5f8802 100644
|
||||
index d83ac28bd9147e33a838cf6250070fa0841f74b2..71434a6778ab85e347d33a7c35cba7c0d7830d1e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -874,11 +874,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@ -5,11 +5,11 @@ Subject: [PATCH] Spawn player in correct world on login
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index b4e9462cbeec9ec8bd25b79839fde7d92410057f..b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad 100644
|
||||
index c6b76049c70bf42c216d833b6dc33254c24b2253..b6bdbe4033b0252d61e8a0affd011475e700cb59 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -209,7 +209,18 @@ public abstract class PlayerList {
|
||||
}String lastKnownName = s; // Paper
|
||||
@@ -201,7 +201,18 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- if (nbttagcompound != null) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b6741c72216378368392e65aad3ff75a3191d0ce..b96a783e4df3a5ce1115d05e00e1ae2e0cd6378d 100644
|
||||
index f0c37129240fadac40fec607afda1ccef446caa0..745797f1110db582cdac83c423b4cae78928ffe2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3471,7 +3471,7 @@ public abstract class LivingEntity extends Entity {
|
@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
|
||||
still at a respawn anchor.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad..62fe8133e10ca4e04670b504bf18db9f5e7512e0 100644
|
||||
index b6bdbe4033b0252d61e8a0affd011475e700cb59..c618388599c5b56320c526e71613f8434a0e2c47 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -850,6 +850,7 @@ public abstract class PlayerList {
|
||||
@@ -773,6 +773,7 @@ public abstract class PlayerList {
|
||||
// Paper start
|
||||
boolean isBedSpawn = false;
|
||||
boolean isRespawn = false;
|
||||
@ -21,7 +21,7 @@ index b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad..62fe8133e10ca4e04670b504bf18db9f
|
||||
// Paper end
|
||||
|
||||
// CraftBukkit start - fire PlayerRespawnEvent
|
||||
@@ -860,7 +861,7 @@ public abstract class PlayerList {
|
||||
@@ -783,7 +784,7 @@ public abstract class PlayerList {
|
||||
Optional optional;
|
||||
|
||||
if (blockposition != null) {
|
||||
@ -30,7 +30,7 @@ index b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad..62fe8133e10ca4e04670b504bf18db9f
|
||||
} else {
|
||||
optional = Optional.empty();
|
||||
}
|
||||
@@ -904,7 +905,12 @@ public abstract class PlayerList {
|
||||
@@ -827,7 +828,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// Spigot End
|
||||
|
||||
@ -44,7 +44,7 @@ index b4ee231092c0e7a9e4a6ee978d9d8de320ac1cad..62fe8133e10ca4e04670b504bf18db9f
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
isRespawn = true; // Paper
|
||||
} else {
|
||||
@@ -944,8 +950,12 @@ public abstract class PlayerList {
|
||||
@@ -867,8 +873,12 @@ public abstract class PlayerList {
|
||||
}
|
||||
// entityplayer1.initInventoryMenu();
|
||||
entityplayer1.setHealth(entityplayer1.getHealth());
|
@ -5,7 +5,7 @@ Subject: [PATCH] Brand support
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index c88e6ca7ee28ebaf235e11bbe70b13c90508924e..39fe98d65f3029efa2f54c2b6dbf1e53c1957b6e 100644
|
||||
index f07b584d1d7a97e242c7699fa277d0c642da1857..d06d1e00b42dd9474ec834e0bafa94329b90cb75 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -298,6 +298,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@ -17,7 +17,7 @@ index c88e6ca7ee28ebaf235e11bbe70b13c90508924e..39fe98d65f3029efa2f54c2b6dbf1e53
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) {
|
||||
this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH);
|
||||
this.lastSeenMessages = new LastSeenMessagesValidator(20);
|
||||
@@ -3326,6 +3328,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3322,6 +3324,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register");
|
||||
private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister");
|
||||
|
||||
@ -26,7 +26,7 @@ index c88e6ca7ee28ebaf235e11bbe70b13c90508924e..39fe98d65f3029efa2f54c2b6dbf1e53
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
@@ -3353,6 +3357,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3349,6 +3353,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
try {
|
||||
byte[] data = new byte[packet.data.readableBytes()];
|
||||
packet.data.readBytes(data);
|
||||
@ -42,7 +42,7 @@ index c88e6ca7ee28ebaf235e11bbe70b13c90508924e..39fe98d65f3029efa2f54c2b6dbf1e53
|
||||
this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data);
|
||||
} catch (Exception ex) {
|
||||
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
|
||||
@@ -3362,6 +3375,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3358,6 +3371,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add #setMaxPlayers API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 62fe8133e10ca4e04670b504bf18db9f5e7512e0..4b2862c6c5397ebec7cc22938b76ed0d24d7125f 100644
|
||||
index c618388599c5b56320c526e71613f8434a0e2c47..f36019234a85c177d3d863979bbc653f89384cd4 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -152,7 +152,7 @@ public abstract class PlayerList {
|
||||
@@ -151,7 +151,7 @@ public abstract class PlayerList {
|
||||
private boolean doWhiteList;
|
||||
private final LayeredRegistryAccess<RegistryLayer> registries;
|
||||
private final RegistryAccess.Frozen synchronizedRegistries;
|
||||
@ -18,7 +18,7 @@ index 62fe8133e10ca4e04670b504bf18db9f5e7512e0..4b2862c6c5397ebec7cc22938b76ed0d
|
||||
private int simulationDistance;
|
||||
private boolean allowCheatsForAllPlayers;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index a8bd9f368182395962b63b52c9107debcb6ab6b9..d296f5c970dc4c242fc18fb82e6db583eefef8d8 100644
|
||||
index 829105771a06deca2a85e2f27b68d96c28c1218b..3eac1b8e1fa4ce5fb30321498a0fa9c10d62c579 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -687,6 +687,13 @@ public final class CraftServer implements Server {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 629f7fb76fc0382235ca5c7f87121bf0092ec279..b4f299a61b9c02d1dc679a0eff2b039c984bef37 100644
|
||||
index 95c53189e32aec6aca254fa3b157df7bc68d4d1a..0637fd424e98175f864f15c8bfa8bf696ed47fe7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1868,6 +1868,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1866,6 +1866,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
//ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(new BlockPosition(this.worldData.a(), 0, this.worldData.c()));
|
||||
|
||||
this.levelData.setSpawn(pos, angle);
|
@ -25,7 +25,7 @@ index 34e4d00ede62be50808a2782e54da987cc62c9af..e12c67bdfa326b3f52f6a4973063cef4
|
||||
|
||||
this.connection.send(new ClientboundLoginDisconnectPacket(ichatmutablecomponent));
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index d92aaec3a4535d3683e842f9a712ba06c03014ef..3042af47778f5d6c878a7a734a8eb92e952c01a8 100644
|
||||
index 75a32d33518023cb24ba639751631bfad3563bd5..0869a7d6807815879aa9ded0d8b9baee82d535a9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -102,7 +102,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
|
@ -9,10 +9,10 @@ as this is how Vanilla teleports entities.
|
||||
Cancel any pending motion when teleported.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 40423a24eac6675c8b9ddb843c910e324709ebe4..040972c62b8d6005a47ccb81a3fda1b4f98f8838 100644
|
||||
index d06d1e00b42dd9474ec834e0bafa94329b90cb75..15b16d37928eca9f8da026df0c76a1f7cd43ba70 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -752,7 +752,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -748,7 +748,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
return;
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index 40423a24eac6675c8b9ddb843c910e324709ebe4..040972c62b8d6005a47ccb81a3fda1b4
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1669,7 +1669,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1665,7 +1665,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
@ -6,10 +6,10 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b4f299a61b9c02d1dc679a0eff2b039c984bef37..8c32f34a3bf03f4e95bf961f33e6e98368e7e961 100644
|
||||
index 0637fd424e98175f864f15c8bfa8bf696ed47fe7..8866507da8474e4eee767fdf6f83b95c92fb5767 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1369,6 +1369,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1367,6 +1367,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
In neuem Issue referenzieren
Einen Benutzer sperren