[ci skip] Move chunk system patch a bit back

This commit is contained in:
Nassim Jahnke 2024-01-24 15:57:53 +01:00
parent d405ff1255
commit a4a08b7342
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
257 changed files with 721 additions and 739 deletions

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a08cf32d56b6f5491d2f2e8e9486a5d65ec9a825..9810c476ba7cdee6a2ed17c48f8f101426596aea 100644
index 48fca15cdc6b0bafc3d8ff13cc96b3258104c1fb..cbc472cc725c925395f60b7bea0de6663b5346ab 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3242,6 +3242,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3161,6 +3161,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleClientInformation(ServerboundClientInformationPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());

View File

@ -10,7 +10,7 @@ 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 172d7c3df8f9aab24d49b2ff12e3cdf5f40727f9..db40e72020ff651e8e77cf2f214e3d5cce61ea5a 100644
index a35dda4010c6db1a8e1efb7951ac8732d9a1e16e..98e66497f1a81e3df8d555ffdd36b9aae9f39447 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -805,6 +805,7 @@ public abstract class PlayerList {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix SPIGOT-5824 Bukkit world-container is not used
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 0c9f6443663bc567a181393b13311a909602f4a4..a32449f5bfc88b251022064b6f9f5cc0d368fbca 100644
index 5374a6b70a9780cfe9f62207b290b9a3ab82c7e9..976d5e9c965324537720e38acf6a6deda079a324 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -175,8 +175,17 @@ public class Main {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix SPIGOT-5885 Unable to disable advancements
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index a32449f5bfc88b251022064b6f9f5cc0d368fbca..7c8af0b369457098afb726fefb5087dbf159cb66 100644
index 976d5e9c965324537720e38acf6a6deda079a324..a99fddc55bf125fe6de7be254e9f9384c2bf9ba3 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -175,6 +175,7 @@ public class Main {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Brand support
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 897fa2857f070a976cc95695d7009f663a6bc89d..27f1d336b2493bf475a388f63cce8d99408acea3 100644
index c4e0fa6c24f9df0d99508ea7d6a9ed974f14835e..468e4ccbe767a04a6903307f7285e882fab9e598 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -274,6 +274,7 @@ public class ServerPlayer extends Player {
@ -14,8 +14,8 @@ index 897fa2857f070a976cc95695d7009f663a6bc89d..27f1d336b2493bf475a388f63cce8d99
public com.destroystokyo.paper.event.entity.PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - PlayerNaturallySpawnCreaturesEvent
+ public @Nullable String clientBrandName = null; // Paper - Brand support
// Paper start - replace player chunk loader
private final java.util.concurrent.atomic.AtomicReference<io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances> viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1));
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index e69043316372d98b122ed3788fda79cdd36849e8..6597e6e9987ddb5906909c22704fdfb6557aee8e 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@ -57,10 +57,10 @@ index e69043316372d98b122ed3788fda79cdd36849e8..6597e6e9987ddb5906909c22704fdfb6
} catch (Exception ex) {
ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 4de49a81238ca3d550f85fdcdf921c17f992f65a..ac908edaad2e58e4813f236e938e9d305f93dbe6 100644
index 549c14e2d861c0b4692ee56e1de5df13ef72f6f8..7a10bdaf6b837738afb73e27fa970f9eff9bb196 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3030,6 +3030,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2988,6 +2988,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper end
};

View File

@ -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 dcc411b3c7d5e5a675c8e21adef25e821ffd7cdd..b455472d258ce59252cb4f93cbef73d3c2da342e 100644
index baafe984f2e015e20e57841b5009861cb0a02525..d7bbe096b2bff241b95da17c2897c88565d521ae 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1996,9 +1996,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1757,9 +1757,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void setDefaultSpawnPos(BlockPos pos, float angle) {
// Paper start - Configurable Keep Spawn Loaded range per world
BlockPos prevSpawn = this.getSharedSpawnPos();
@ -21,7 +21,7 @@ index dcc411b3c7d5e5a675c8e21adef25e821ffd7cdd..b455472d258ce59252cb4f93cbef73d3
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f248735d48aa5c430752426e9dc02c1ae6644aaf..f0f6f2b5f474881c865f1a2098611cd395249530 100644
index fe0095601b41d85d8813af18e1c74b31f26f150d..46a168a3e0db80c1584931c13eedeab420aa76c6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -262,12 +262,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View File

@ -9,20 +9,24 @@ the game, immediately stop the server to prevent data corruption.
You can override this functionality at your own peril.
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
index c1ca83446bb4ccc7c1cb0f5e071850ce15657a69..00e60bba33fe3e100070bb3ded55e5253a8db138 100644
index b4ea37dfa90f0c19914ecd32ddedde586d9d5f78..7ca4790d564846c1ab9560e349005eea8aef35b8 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkSerializer.java
@@ -121,9 +121,22 @@ public class ChunkSerializer {
InProgressChunkHolder holder = readInProgressChunkHolder(world, poiStorage, chunkPos, nbt);
return holder.protoChunk;
}
@@ -91,6 +91,10 @@ public class ChunkSerializer {
private static final String SKYLIGHT_STATE_TAG = "starlight.skylight_state";
private static final String STARLIGHT_VERSION_TAG = "starlight.light_version";
// Paper end - replace light engine impl
+ // Paper start - Do not let the server load chunks from newer versions
+ private static final int CURRENT_DATA_VERSION = net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion();
+ private static final boolean JUST_CORRUPT_IT = Boolean.getBoolean("Paper.ignoreWorldDataVersion");
+ // Paper end - Do not let the server load chunks from newer versions
public static InProgressChunkHolder readInProgressChunkHolder(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) {
// Paper end - rewrite chunk system
public ChunkSerializer() {}
@@ -107,6 +111,15 @@ public class ChunkSerializer {
}
// Paper end - guard against serializing mismatching coordinates
public static ProtoChunk read(ServerLevel world, PoiManager poiStorage, ChunkPos chunkPos, CompoundTag nbt) {
+ // Paper start - Do not let the server load chunks from newer versions
+ if (nbt.contains("DataVersion", net.minecraft.nbt.Tag.TAG_ANY_NUMERIC)) {
+ final int dataVersion = nbt.getInt("DataVersion");

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Prevent headless pistons from being created
Prevent headless pistons from being created by explosions or tree/mushroom growth.
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index b1fdfae75aeea78ca77987e40242bf498447bc08..5097d9f1a3ab4e49e1899ede1742436357b0ad91 100644
index 653036ca797ed4e87f0cc15898d55ede2ed96206..c7075aaf417b1dc9eab4a19b72fac50d2a44286b 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -205,6 +205,15 @@ public class Explosion {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add zombie targets turtle egg config
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index ac4916a898af8c3584d84088b18e8b38b5eb6b13..47f8e5ecadf79fa66db0248ef23eab1e6524f108 100644
index 408cbb80df72cf67e5228a76b7f267281e1752ab..67aaa688b4db0c4304699fdd983730cdb4a68058 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -109,7 +109,7 @@ public class Zombie extends Monster {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ca005f3c60e58a2ac3e391c9107023e982f33ffe..78df27da35b8c30d1de189aaac0710c94e7112f9 100644
index f03a2995c2eb080ec4db0d6c3aa261a463c08579..3b50dc6f01a449ca3d5cfa02aadc8c63777a0094 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2011,6 +2011,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2017,6 +2017,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().reloadResources();
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);

View File

@ -9,7 +9,7 @@ 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 2f8715e200b9b8ae4c4b70ddd7cdc3368a109939..fba468f0a15dca041acf00e3865485055d2b8cb1 100644
index cbc472cc725c925395f60b7bea0de6663b5346ab..9a6f2281efb3b62ddcb194061bf3dbc4b80a440b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -657,7 +657,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -21,7 +21,7 @@ index 2f8715e200b9b8ae4c4b70ddd7cdc3368a109939..fba468f0a15dca041acf00e386548505
this.lastGoodX = this.awaitingPositionFromClient.x;
this.lastGoodY = this.awaitingPositionFromClient.y;
this.lastGoodZ = this.awaitingPositionFromClient.z;
@@ -1587,7 +1587,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1580,7 +1580,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// CraftBukkit end
this.awaitingTeleportTime = this.tickCount;
@ -31,7 +31,7 @@ index 2f8715e200b9b8ae4c4b70ddd7cdc3368a109939..fba468f0a15dca041acf00e386548505
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index a6fc2a67027b749b9f87110aa15b339bdc58a72b..ac2380e43639f661358b63eef77cbc7b408a0180 100644
index 70380d5807cac6dec19ebe581d685b1e32d8830b..9946f04c7e5877f094293c4c0976aeecf5c83c56 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -161,6 +161,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -42,7 +42,7 @@ index a6fc2a67027b749b9f87110aa15b339bdc58a72b..ac2380e43639f661358b63eef77cbc7b
static boolean isLevelAtLeast(CompoundTag tag, int level) {
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
@@ -1825,6 +1826,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1773,6 +1774,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void moveTo(double x, double y, double z, float yaw, float pitch) {
@ -57,7 +57,7 @@ index a6fc2a67027b749b9f87110aa15b339bdc58a72b..ac2380e43639f661358b63eef77cbc7b
this.setYRot(yaw);
this.setXRot(pitch);
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index 0c14b382e7660ce518096e9f26525ccea57a1bf9..a9c74ef33182505b6982fea273a760e937ddbf51 100644
index 8e6d782f3a5a000217b7dcd27fc88aa340a58f47..7fdf026bdeb85d149e24aa013181a848ece4c55e 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
@@ -169,6 +169,7 @@ public abstract class BaseSpawner {

View File

@ -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 b455472d258ce59252cb4f93cbef73d3c2da342e..611f06d58708a06e1b8ac4f9d4c7a715f177e31f 100644
index d7bbe096b2bff241b95da17c2897c88565d521ae..e360048893f7719e6735724a2e0c2606879d6c9d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1494,6 +1494,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1255,6 +1255,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 {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 838004fc124bd5f7b46dbfa9d69d3fde6e990623..4def6868bc0a51d408f67b4de13c85b2eed76e13 100644
index 9946f04c7e5877f094293c4c0976aeecf5c83c56..5dce8180a7ddfdd5fd32509010bdbaa66788a7c2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4459,4 +4459,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4384,4 +4384,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
void accept(Entity entity, double x, double y, double z);
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4def6868bc0a51d408f67b4de13c85b2eed76e13..7f5efeef47e4f31106e4a0069feea7f82aa89f88 100644
index 5dce8180a7ddfdd5fd32509010bdbaa66788a7c2..f4f5175c3c8c12d390470b7f44ad9d2ca39ff1fc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4464,5 +4464,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4389,5 +4389,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public static int nextEntityId() {
return ENTITY_COUNTER.incrementAndGet();
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 78df27da35b8c30d1de189aaac0710c94e7112f9..e60e5f94cd05d71b29414f2a911ac4ce9d8f7412 100644
index 3b50dc6f01a449ca3d5cfa02aadc8c63777a0094..e7936fbc641769dfea77ae4add7b1b19e59addbb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2094,13 +2094,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2100,13 +2100,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.isEnforceWhitelist()) {
PlayerList playerlist = source.getServer().getPlayerList();
UserWhiteList whitelist = playerlist.getWhiteList();

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server
Check movement distance also based on current position.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fba468f0a15dca041acf00e3865485055d2b8cb1..8682ba8d677461842fbb0b40a3d5fdd4d22a8e9e 100644
index 9a6f2281efb3b62ddcb194061bf3dbc4b80a440b..93c708ad4f16cc6fc8334c36b1131235bc6e2925 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -473,9 +473,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -53,7 +53,7 @@ index fba468f0a15dca041acf00e3865485055d2b8cb1..8682ba8d677461842fbb0b40a3d5fdd4
boolean flag1 = entity.verticalCollisionBelow;
if (entity instanceof LivingEntity) {
@@ -1272,7 +1281,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1265,7 +1274,16 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d7 = d1 - this.firstGoodY;
double d8 = d2 - this.firstGoodZ;
double d9 = this.player.getDeltaMovement().lengthSqr();
@ -71,7 +71,7 @@ index fba468f0a15dca041acf00e3865485055d2b8cb1..8682ba8d677461842fbb0b40a3d5fdd4
if (this.player.isSleeping()) {
if (d10 > 1.0D) {
@@ -1326,9 +1344,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1319,9 +1337,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
AABB axisalignedbb = this.player.getBoundingBox();

View File

@ -10,7 +10,7 @@ In general, look at making this logic more robust (i.e properly handling
cases where a captured entry is overriden) - but for now this will do.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index ee237d0e57cbb9b8fe2ae3c84fa7d7a964ad73b9..859f515813240030b3598a2152dd41d4fb8828ad 100644
index 3f1c0f3b879bf562db2b999dd39a3ce37759775d..3e98a86dd56855485c7d8c26eb30f2bbace2d66c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -159,7 +159,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

View File

@ -8,7 +8,7 @@ This can realistically only happen if there's custom loot active on fishing
which can return 0 items. This would disconnect the player who's fishing.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index 5c77992e0c49eb217dd66657b35164225b400518..a9eaa079a43bc8a5e81deaf6df5ce2f9c53cb319 100644
index 94bdd467108bc5fd0211f67a792787ef7c356619..f3694d432e280cace281eda95d8c2d4dd5d6930a 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -503,9 +503,15 @@ public class FishingHook extends Projectile {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 8b5fb5e5719ea1453751ef8f7bd97bca1af64ae8..2685722282f0b90bdcf65ba6675998b31f491b31 100644
index 3aa481599811af7cd9b0c523f66dac469105ee49..da0af328409aae94b3d537bf2db083fbc269d573 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1909,6 +1909,28 @@ public final class CraftServer implements Server {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Beacon API - custom effect ranges
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index cd28ee0cbc69713a641a21c9a626c694a4bcbfc9..7205d0ea78af545108719c1373ba7946ede34ae6 100644
index f3b9a692417dbfc67b939a753c29ad1c159e274b..80bd394920902cd67ef22bf9a14db64800a3ab97 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -82,6 +82,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name

View File

@ -25,7 +25,7 @@ index 777681a58417684a35a875c869ab22e50bb27da5..1e495daf53a53260e1a3b1c86365edb9
Connection.LOGGER.debug("Failed to sent packet", throwable);
if (this.getSending() == PacketFlow.CLIENTBOUND) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 27f1d336b2493bf475a388f63cce8d99408acea3..d5b5ad2f91d440ae0a1e61accab60122335591d4 100644
index 468e4ccbe767a04a6903307f7285e882fab9e598..58bbf3176f405c3c31007780368a3e16948382a7 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -275,6 +275,7 @@ public class ServerPlayer extends Player {
@ -34,8 +34,8 @@ index 27f1d336b2493bf475a388f63cce8d99408acea3..d5b5ad2f91d440ae0a1e61accab60122
public @Nullable String clientBrandName = null; // Paper - Brand support
+ public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - Add API for quit reason; there are a lot of changes to do if we change all methods leading to the event
// Paper start - replace player chunk loader
private final java.util.concurrent.atomic.AtomicReference<io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances> viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1));
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 6597e6e9987ddb5906909c22704fdfb6557aee8e..6bb846d3ee2fb54ab3ffa116607f2a83e538460e 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@ -49,7 +49,7 @@ index 6597e6e9987ddb5906909c22704fdfb6557aee8e..6bb846d3ee2fb54ab3ffa116607f2a83
this.connection.disconnect(ichatbasecomponent);
}));
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index db40e72020ff651e8e77cf2f214e3d5cce61ea5a..d356981f7ed3c517aa6c9ff81a7a72b9872021ad 100644
index 98e66497f1a81e3df8d555ffdd36b9aae9f39447..5e6aa40d7574b939746ac4724a24d85f9cf29d76 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -578,7 +578,7 @@ public abstract class PlayerList {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose world spawn angle
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index d356981f7ed3c517aa6c9ff81a7a72b9872021ad..3fa1033936fa3d0c00fc4d51ec10d1977765d2d5 100644
index 5e6aa40d7574b939746ac4724a24d85f9cf29d76..4771d0da97421443089499cc376bdf469dec8522 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -848,7 +848,7 @@ public abstract class PlayerList {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index ac908edaad2e58e4813f236e938e9d305f93dbe6..7d5733f6c45c0521b1d1a37d6dfc3b0a7aad1662 100644
index 7a10bdaf6b837738afb73e27fa970f9eff9bb196..1b9eeb31e2cea8a30640af4daa73f7a3b335a9c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2593,7 +2593,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -2551,7 +2551,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fcb928696e676fe0749b1bc4b1aa433985767f5b..a1cf6f17313f4f861f3c5c6ebcaafc85d9102b55 100644
index f4f5175c3c8c12d390470b7f44ad9d2ca39ff1fc..55395837df277eac393949aa7447d69e57c5d756 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2018,6 +2018,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1966,6 +1966,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean isPushable() {
@ -22,7 +22,7 @@ index fcb928696e676fe0749b1bc4b1aa433985767f5b..a1cf6f17313f4f861f3c5c6ebcaafc85
}
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
index c9c7833755af3c7bef1d40f2ca425cbec59efa68..75cdddbfbbc4c0c521194dde27ba5f5d17221842 100644
index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4def433d2 100644
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
@@ -46,11 +46,16 @@ public final class EntitySelector {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 8682ba8d677461842fbb0b40a3d5fdd4d22a8e9e..3756ea70ae32005eb5d6b8285b1b1c1273c553f0 100644
index 93c708ad4f16cc6fc8334c36b1131235bc6e2925..52ad9ec75333ba6aac38ae3874b26435a1f896d4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -258,6 +258,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -24,7 +24,7 @@ index 8682ba8d677461842fbb0b40a3d5fdd4d22a8e9e..3756ea70ae32005eb5d6b8285b1b1c12
/* Use thread-safe field access instead
if (this.chatSpamTickCount > 0) {
--this.chatSpamTickCount;
@@ -2985,6 +2987,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2978,6 +2980,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {

View File

@ -5,24 +5,24 @@ Subject: [PATCH] Player Chunk Load/Unload Events
diff --git a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
index 5de5209e04d631bd6a50e28e8d3abebf148252c1..43e3c99eafaed42161664e31827dfd0abb127ad2 100644
index c509a1318bcef38fd4927e38b6ee9846853e2d15..13209267c26f46492a92e820889a9be0bd2287a0 100644
--- a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
+++ b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
@@ -46,6 +46,11 @@ public class PlayerChunkSender {
public static void dropChunkStatic(ServerPlayer player, ChunkPos pos) {
player.serverLevel().chunkSource.chunkMap.getVisibleChunkIfPresent(pos.toLong()).removePlayer(player);
player.connection.send(new ClientboundForgetLevelChunkPacket(pos));
+ // Paper start - PlayerChunkUnloadEvent
+ if (io.papermc.paper.event.packet.PlayerChunkUnloadEvent.getHandlerList().getRegisteredListeners().length > 0) {
+ new io.papermc.paper.event.packet.PlayerChunkUnloadEvent(player.getBukkitEntity().getWorld().getChunkAt(pos.longKey), player.getBukkitEntity()).callEvent();
+ }
+ // Paper end - PlayerChunkUnloadEvent
}
// Paper end - rewrite player chunk loader
@@ -45,6 +45,11 @@ public class PlayerChunkSender {
public void dropChunk(ServerPlayer player, ChunkPos pos) {
if (!this.pendingChunks.remove(pos.toLong()) && player.isAlive()) {
player.connection.send(new ClientboundForgetLevelChunkPacket(pos));
+ // Paper start - PlayerChunkUnloadEvent
+ if (io.papermc.paper.event.packet.PlayerChunkUnloadEvent.getHandlerList().getRegisteredListeners().length > 0) {
+ new io.papermc.paper.event.packet.PlayerChunkUnloadEvent(player.getBukkitEntity().getWorld().getChunkAt(pos.longKey), player.getBukkitEntity()).callEvent();
+ }
+ // Paper end - PlayerChunkUnloadEvent
}
@@ -86,6 +91,11 @@ public class PlayerChunkSender {
public static void sendChunk(ServerGamePacketListenerImpl handler, ServerLevel world, LevelChunk chunk) { // Paper - rewrite chunk loader - public
handler.player.serverLevel().chunkSource.chunkMap.getVisibleChunkIfPresent(chunk.getPos().toLong()).addPlayer(handler.player);
}
@@ -77,6 +82,11 @@ public class PlayerChunkSender {
private static void sendChunk(ServerGamePacketListenerImpl handler, ServerLevel world, LevelChunk chunk) {
handler.send(new ClientboundLevelChunkWithLightPacket(chunk, world.getLightEngine(), (BitSet)null, (BitSet)null));
+ // Paper start - PlayerChunkLoadEvent
+ if (io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0) {

View File

@ -28,13 +28,13 @@ index 05ac41e136da43284fb24a6b698ebd36318278fb..3c4ac79c094dc2fff7de94150a34b7bf
public Vec3 decode(long x, long y, long z) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index b9c919c466d6591492ede8a53df673114c50c1d9..18438f5c92840bd07e7ef0c2203d4ec943cb3161 100644
index 55395837df277eac393949aa7447d69e57c5d756..da5dcea43fdbc0ad0acb1130d363cc8cbea16dfa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4235,6 +4235,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -4167,6 +4167,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return;
}
// Paper end - rewrite chunk system
// Paper end - Block invalid positions and bounding box
+ // Paper start - Fix MC-4
+ if (this instanceof ItemEntity) {
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.fixEntityPositionDesync) {

View File

@ -11,10 +11,10 @@ Subject: [PATCH] Fix interact event not being called sometimes
Co-authored-by: Moulberry <james.jenour@protonmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3756ea70ae32005eb5d6b8285b1b1c1273c553f0..c169c44321c8bd6ea562f99f6c8a5a5f5be79425 100644
index 52ad9ec75333ba6aac38ae3874b26435a1f896d4..1f39a44b27cf427885a14115946f0f1a54508c5b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1760,7 +1760,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1753,7 +1753,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED);
this.player.sendSystemMessage(ichatmutablecomponent, true);
@ -23,7 +23,7 @@ index 3756ea70ae32005eb5d6b8285b1b1c1273c553f0..c169c44321c8bd6ea562f99f6c8a5a5f
this.player.swing(enumhand, true);
}
}
@@ -2306,13 +2306,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2299,13 +2299,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d3 = this.player.gameMode.getGameModeForPlayer() == GameType.CREATIVE ? 5.0D : 4.5D;
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
// SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities

View File

@ -64,10 +64,10 @@ index 334001cb749600c973c82391e1c11f0e40bd2dfb..f3cdf1fa7731eb7bb1cb89aa6a37204d
public int get() {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f0f6f2b5f474881c865f1a2098611cd395249530..9ca85c53236528460441d2da7f2935438c6b0078 100644
index 46a168a3e0db80c1584931c13eedeab420aa76c6..75387d9507add359e7b35527c6a69b6a96cdff5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1880,8 +1880,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1851,8 +1851,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!this.isGameRule(rule)) return false;
@ -82,7 +82,7 @@ index f0f6f2b5f474881c865f1a2098611cd395249530..9ca85c53236528460441d2da7f293543
handle.onChanged(this.getHandle().getServer());
return true;
}
@@ -1917,8 +1922,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1888,8 +1893,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (!this.isGameRule(rule.getName())) return false;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add ServerResourcesReloadedEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e60e5f94cd05d71b29414f2a911ac4ce9d8f7412..5429906d0d793a45d7cedc2c14cae9d3e0ebb5e2 100644
index e7936fbc641769dfea77ae4add7b1b19e59addbb..e679ee1cfae0787775c655690094d72732e1bbb4 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1979,7 +1979,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1985,7 +1985,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
return this.functionManager;
}
@ -22,7 +22,7 @@ index e60e5f94cd05d71b29414f2a911ac4ce9d8f7412..5429906d0d793a45d7cedc2c14cae9d3
RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE);
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
@@ -2012,6 +2018,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2018,6 +2024,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings; they can be defined by datapacks so refresh it here

View File

@ -18,7 +18,7 @@ index dadb419a04b343d6ba59353c6caa1a50aa07b67f..117d466e1b4f545f6fd5006c3822c558
LocalDate localdate = LocalDate.now();
int i = localdate.get(ChronoField.DAY_OF_MONTH);
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 47f8e5ecadf79fa66db0248ef23eab1e6524f108..5f4b25d69c31f21936376a39db60992db2e71b00 100644
index 67aaa688b4db0c4304699fdd983730cdb4a68058..a0cd226d4f5c700c84604527ddde35466c7654bb 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -507,7 +507,7 @@ public class Zombie extends Monster {

View File

@ -23,7 +23,7 @@ index 9fec5823d99d1ae8e41d9e21f7ddb8b8e94bf887..a6af5ac9d09834940d3dd4c80b16450b
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
index 5f4b25d69c31f21936376a39db60992db2e71b00..5d0e587941253a051839ac7fa877bb3bc887f6b5 100644
index a0cd226d4f5c700c84604527ddde35466c7654bb..a41a2ffe3b0af5c244a513c839829da3f86e5ed3 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
@@ -100,7 +100,7 @@ public class Zombie extends Monster {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 611f06d58708a06e1b8ac4f9d4c7a715f177e31f..5020d671c7bbaf4277c300f3688c770b6a565129 100644
index e360048893f7719e6735724a2e0c2606879d6c9d..2f1d8a02f9fd85b4d577b67237de8400917c151f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2065,6 +2065,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1826,6 +1826,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
});
optional1.ifPresent((holder) -> {
this.getServer().execute(() -> {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix villager boat exploit
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 3fa1033936fa3d0c00fc4d51ec10d1977765d2d5..a24aa06d65dadaece78e37ba6f67aee724c410f0 100644
index 4771d0da97421443089499cc376bdf469dec8522..5cb195fc8d1431088253d496585f19e81f8082ef 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -603,6 +603,14 @@ public abstract class PlayerList {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index a24aa06d65dadaece78e37ba6f67aee724c410f0..5541508a1c50ec5375db48d87203c922c6a439de 100644
index 5cb195fc8d1431088253d496585f19e81f8082ef..065a189566d1eea08b1013ce64d1f2282d0c2dc3 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1101,6 +1101,11 @@ public abstract class PlayerList {
@ -32,10 +32,10 @@ index a24aa06d65dadaece78e37ba6f67aee724c410f0..5541508a1c50ec5375db48d87203c922
public boolean isWhiteListed(GameProfile profile) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7d5733f6c45c0521b1d1a37d6dfc3b0a7aad1662..a0e33c3b6e8134ec7570a8c160da41c4a92d5040 100644
index 1b9eeb31e2cea8a30640af4daa73f7a3b335a9c4..57839c42ca0f9925028eb4f8e3d39a252b9fcbf8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -633,6 +633,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -591,6 +591,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
// Paper end

View File

@ -47,7 +47,7 @@ index 0000000000000000000000000000000000000000..2667067fd13f61e0464ba88ae4e4a707
+ }
+}
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 1eacb6998f99833441dd1dcb8301f25759675f53..180f8ae443d1ea44a748c7f3ebb82a0bab8d31f1 100644
index 3e57142dd9cb23d43857d5a4cb30962e4b696b74..a6d5b3fa7e3437e0aec54eec4079e9f3267c64b8 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -121,6 +121,24 @@ public abstract class ChunkGenerator {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Collision option for requiring a player participant
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 3877544229bc8a4e6e475060c4edca17c64ff739..d2c2dd79cc6f484306bd1ab523cb4d9283131d1b 100644
index da5dcea43fdbc0ad0acb1130d363cc8cbea16dfa..4fd7cd7b2dba4047f36a52c510f12d61f281a95f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1888,6 +1888,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1836,6 +1836,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void push(Entity entity) {
if (!this.isPassengerOfSameVehicle(entity)) {
if (!entity.noPhysics && !this.noPhysics) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expand EntityUnleashEvent
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 7d0ccdd4b144afed8a93256941b3d8618c847f4d..6482dc12324524b92e0161055ad13d27dfb7f97d 100644
index c4b05c7e339a2ec01ee3f5e4dec0b3493788d8d2..8cc40521146d02bbfafbb113dda8183840814c96 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -1292,12 +1292,15 @@ public abstract class Mob extends LivingEntity implements Targeting {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Reset shield blocking on dimension change
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d5b5ad2f91d440ae0a1e61accab60122335591d4..75bd3de7bc1596a4782b82e30162d89aa3e99211 100644
index 58bbf3176f405c3c31007780368a3e16948382a7..4b4f5fcb51b54981d81924e3d1b9ff091e2c5ae5 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1243,6 +1243,11 @@ public class ServerPlayer extends Player {
@@ -1199,6 +1199,11 @@ public class ServerPlayer extends Player {
this.level().getCraftServer().getPluginManager().callEvent(changeEvent);
// CraftBukkit end
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityMoveEvent
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 5429906d0d793a45d7cedc2c14cae9d3e0ebb5e2..7857a385aef33fa3bc9bfe01223016c0eb879112 100644
index e679ee1cfae0787775c655690094d72732e1bbb4..f8e74f8818002f7cc1be0bdb2317439b29a05ad5 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1469,6 +1469,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -1475,6 +1475,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next();
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
@ -17,7 +17,7 @@ index 5429906d0d793a45d7cedc2c14cae9d3e0ebb5e2..7857a385aef33fa3bc9bfe01223016c0
this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e6216892f5bbc22dfde1eebfea33709e2eea841c..a24c782dfdf47868fdd8d494f0af1024fdc6ebe5 100644
index 2f1d8a02f9fd85b4d577b67237de8400917c151f..909f9c0a53971a28844a59b1cb4b996afb902d80 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] added option to disable pathfinding updates on block changes
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index f69fae303770b3ccace8e7d421b762504a7cb5dc..901d9f47a63f5c6ddd596c7d327abd06f5a17f16 100644
index 909f9c0a53971a28844a59b1cb4b996afb902d80..379be7cd3ce1808cf0cf50e50ac7e8de8c8f652c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1639,6 +1639,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1400,6 +1400,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
this.getChunkSource().blockChanged(pos);
@ -16,7 +16,7 @@ index f69fae303770b3ccace8e7d421b762504a7cb5dc..901d9f47a63f5c6ddd596c7d327abd06
VoxelShape voxelshape = oldState.getCollisionShape(this, pos);
VoxelShape voxelshape1 = newState.getCollisionShape(this, pos);
@@ -1680,6 +1681,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1441,6 +1442,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}

View File

@ -21,7 +21,7 @@ index a20d47f54f12dfc0a5f76dd969238e34c958b618..1c9cf5e1c4ee05724ffcdbd77a19bca1
this.saveUserBanList();
this.loadIpBanList();
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 5ecf65315b42cd07dcd69a10c445b1f0576f03c5..a27e9ba8448930e45e283b8e19156bcf86b9baee 100644
index 317f9048be060778104c8ac3494599c2141b7aac..413f2ab9b6df22f083df684a8a2e7e97a7a312a1 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -199,6 +199,12 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -48,7 +48,7 @@ index 5ecf65315b42cd07dcd69a10c445b1f0576f03c5..a27e9ba8448930e45e283b8e19156bcf
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 5541508a1c50ec5375db48d87203c922c6a439de..974ca4ebdbbbbe38ef0f0c1992f69bdcfd52cbf9 100644
index 065a189566d1eea08b1013ce64d1f2282d0c2dc3..fde0b21f3e3349cf55ed6e9c200cf0b63dcb11a9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -176,6 +176,7 @@ public abstract class PlayerList {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow using signs inside spawn protection
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c169c44321c8bd6ea562f99f6c8a5a5f5be79425..dba0aa5d1dc63e8d9f4a429e7b7c415bea0af3d8 100644
index 1f39a44b27cf427885a14115946f0f1a54508c5b..8520433df409d30c746640602e36a54587020b08 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1752,7 +1752,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1745,7 +1745,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
int i = this.player.level().getMaxBuildHeight();
if (blockposition.getY() < i) {

View File

@ -20,7 +20,7 @@ index 0fb214ddd919b568da64541fd9b531c65caa5fad..9cd267f53505658d1c75187b662c4d9f
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2685722282f0b90bdcf65ba6675998b31f491b31..59935e2557ece2890cf0fc62096a01ef2c52e384 100644
index da0af328409aae94b3d537bf2db083fbc269d573..3ace5c08dfa2b156d79a00f06a2977c385fe5210 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1137,9 +1137,15 @@ public final class CraftServer implements Server {

View File

@ -7,7 +7,7 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
Closes #5036
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 974ca4ebdbbbbe38ef0f0c1992f69bdcfd52cbf9..b6f173055be42e8627f162f02da00227a4e5f2b6 100644
index fde0b21f3e3349cf55ed6e9c200cf0b63dcb11a9..ad8d02821131eac8cb04532a57265fa450cd8e87 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -596,6 +596,14 @@ public abstract class PlayerList {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] forced whitelist: use configurable kick message
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7857a385aef33fa3bc9bfe01223016c0eb879112..d4c1b31eb016bb6f39d3a399fb07f3cee40d6391 100644
index f8e74f8818002f7cc1be0bdb2317439b29a05ad5..2615fbf23202c3218826d98835e327a71a5214e2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2110,7 +2110,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2116,7 +2116,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index dba0aa5d1dc63e8d9f4a429e7b7c415bea0af3d8..faac58b840e173469a1549680bc80b60ed74b6e8 100644
index 8520433df409d30c746640602e36a54587020b08..dd31da062fd7dbc420e4b3066a526b5892abdfea 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1187,7 +1187,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1180,7 +1180,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
itemstack.addTagElement("pages", nbttaglist);

View File

@ -208,7 +208,7 @@ index 0000000000000000000000000000000000000000..dd9d77d7c7f1a5a130a1f4c15e5b1e68
+ public void setErrorIndex(final int errorIndex) {}
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index a27e9ba8448930e45e283b8e19156bcf86b9baee..83bf6e7fd2f59ddc6b10a11d64ad198f8277e0fa 100644
index 413f2ab9b6df22f083df684a8a2e7e97a7a312a1..46b581e1f930eda3671a283ad89ed1c2094e2cd6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -173,7 +173,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View File

@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index faac58b840e173469a1549680bc80b60ed74b6e8..6252f71c6b5df2a35d58c8f7cd64049b2819ddc0 100644
index dd31da062fd7dbc420e4b3066a526b5892abdfea..923026fbc223d845ed8ea4028522b4c6d21673f2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1921,6 +1921,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1914,6 +1914,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (this.player.isImmobile()) return; // CraftBukkit
if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] More World API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9ca85c53236528460441d2da7f2935438c6b0078..dc36b7686a3d06c07a00e319a2af872bd77d49ef 100644
index 75387d9507add359e7b35527c6a69b6a96cdff5c..6724d0b4e857a9671eac89445ceb70c070b29929 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2126,6 +2126,53 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -2097,6 +2097,53 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this));
}

View File

@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..dd6012b6a097575b2d1471be5069ecce
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 83bf6e7fd2f59ddc6b10a11d64ad198f8277e0fa..143720bfa65e08262b96afbe53d6cf42bc326052 100644
index 46b581e1f930eda3671a283ad89ed1c2094e2cd6..959ce2efe156c8ff2e3d1b57cde27f4da548c3ef 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -210,6 +210,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Expand PlayerRespawnEvent, fix passed parameter issues
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6252f71c6b5df2a35d58c8f7cd64049b2819ddc0..cc393b070f6df598bd4523605d20900c622eac1b 100644
index 923026fbc223d845ed8ea4028522b4c6d21673f2..6acec839ee6d7a8893016e79af76892d63a7b601 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2639,7 +2639,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2632,7 +2632,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
case PERFORM_RESPAWN:
if (this.player.wonGame) {
this.player.wonGame = false;
@ -19,7 +19,7 @@ index 6252f71c6b5df2a35d58c8f7cd64049b2819ddc0..cc393b070f6df598bd4523605d20900c
} else {
if (this.player.getHealth() > 0.0F) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b6f173055be42e8627f162f02da00227a4e5f2b6..cb71aacd23696bf0bf83d2850a5f9cbd46eb1996 100644
index ad8d02821131eac8cb04532a57265fa450cd8e87..37662f2b42d1cbaac62743ff9907434670bb93ed 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -780,6 +780,12 @@ public abstract class PlayerList {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Introduce beacon activation/deactivation events
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index 7205d0ea78af545108719c1373ba7946ede34ae6..83a5417d14e89c3e582e400543fe41f129bbbf3b 100644
index 80bd394920902cd67ef22bf9a14db64800a3ab97..2ceadc753eb99a08881f1292de789528f4a3de85 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -221,6 +221,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name

View File

@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b5b2e729c57d0b73c433b0a9f9e673fc96c313d6..6e297adce9b20112b566acbdbad8c0197818b9bc 100644
index 3ace5c08dfa2b156d79a00f06a2977c385fe5210..b3e11cf65548bd79413620a4a6303b530e15297e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -301,6 +301,7 @@ public final class CraftServer implements Server {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add environment variable to disable server gui
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index 7c8af0b369457098afb726fefb5087dbf159cb66..1cad3585ca122a465572b16d4ecbb7231e87c7de 100644
index a99fddc55bf125fe6de7be254e9f9384c2bf9ba3..7a5e70c99716273d04f4cd28d80a38f6f6b3868e 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -326,6 +326,7 @@ public class Main {
@@ -325,6 +325,7 @@ public class Main {
*/
boolean flag1 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui");

View File

@ -45,10 +45,10 @@ index aee8618e27b893b72931e925724dd683d2e6d2aa..f7c9127346261d83413ca03a1cdaa849
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 75bd3de7bc1596a4782b82e30162d89aa3e99211..d1d7f4c3963986031ea26562549ee15c8232a5a9 100644
index 4b4f5fcb51b54981d81924e3d1b9ff091e2c5ae5..364ecb81521a9490d561faddd86aa2ac6b225d12 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1985,8 +1985,16 @@ public class ServerPlayer extends Player {
@@ -1941,8 +1941,16 @@ public class ServerPlayer extends Player {
}
public boolean setGameMode(GameType gameMode) {
@ -67,7 +67,7 @@ index 75bd3de7bc1596a4782b82e30162d89aa3e99211..d1d7f4c3963986031ea26562549ee15c
} else {
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, (float) gameMode.getId()));
if (gameMode == GameType.SPECTATOR) {
@@ -1998,7 +2006,7 @@ public class ServerPlayer extends Player {
@@ -1954,7 +1962,7 @@ public class ServerPlayer extends Player {
this.onUpdateAbilities();
this.updateEffectVisibility();
@ -76,7 +76,7 @@ index 75bd3de7bc1596a4782b82e30162d89aa3e99211..d1d7f4c3963986031ea26562549ee15c
}
}
@@ -2410,6 +2418,16 @@ public class ServerPlayer extends Player {
@@ -2366,6 +2374,16 @@ public class ServerPlayer extends Player {
}
public void loadGameTypes(@Nullable CompoundTag nbt) {
@ -131,10 +131,10 @@ index f66ce9ae705b0fbe17a1bb437bad6808ff47ed92..37513cf5714afda6c552219c2eca8134
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cc393b070f6df598bd4523605d20900c622eac1b..e0e09e9d127cd54ece239c0c1e931bb8802c17a1 100644
index 6acec839ee6d7a8893016e79af76892d63a7b601..4ee35e2f717a5a55c9f90a6528f5c93529a92a84 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2648,7 +2648,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2641,7 +2641,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH);
if (this.server.isHardcore()) {
@ -144,10 +144,10 @@ index cc393b070f6df598bd4523605d20900c622eac1b..e0e09e9d127cd54ece239c0c1e931bb8
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a0e33c3b6e8134ec7570a8c160da41c4a92d5040..7b5fd058817f27ffefcdc7e3667e8258a87cbb4c 100644
index 57839c42ca0f9925028eb4f8e3d39a252b9fcbf8..41e4c05325bb5ef5ce37caabb1c8a76f80d7abe2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1559,7 +1559,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1517,7 +1517,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
Preconditions.checkArgument(mode != null, "GameMode cannot be null");
if (this.getHandle().connection == null) return;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e0e09e9d127cd54ece239c0c1e931bb8802c17a1..2f69f4368bb0fb6d254c1f445953c8dd05d0b0aa 100644
index 4ee35e2f717a5a55c9f90a6528f5c93529a92a84..b27e232689b8af2f3c9f643b9bee805f9a7a0434 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1738,6 +1738,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1731,6 +1731,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (itemstack.isItemEnabled(worldserver.enabledFeatures())) {
BlockHitResult movingobjectpositionblock = packet.getHitResult();
Vec3 vec3d = movingobjectpositionblock.getLocation();

View File

@ -8,10 +8,10 @@ in order to fire the BlockDispenseEvent. This patch corrects
that.
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 738f6348c14b0f6942f90d15b082e16d16c89411..1fb809486ee56efd3d0ef3fa02503ba9be459f68 100644
index 8c8d2e81f0866dc1441e181f2580852d87263bcc..c1c57f24ccfa7bd17541f53d02293db0bce8dc5c 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -628,7 +628,13 @@ public interface DispenseItemBehavior {
@@ -617,7 +617,13 @@ public interface DispenseItemBehavior {
int y = blockposition.getY();
int z = blockposition.getZ();
BlockState iblockdata = worldserver.getBlockState(blockposition);
@ -24,5 +24,5 @@ index 738f6348c14b0f6942f90d15b082e16d16c89411..1fb809486ee56efd3d0ef3fa02503ba9
+ if (willEmptyContentsSolidBucketItem || willEmptyBucketItem) {
+ // Paper end - correctly check if the bucket place will succeed
org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event
CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add Unix domain socket support
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 143720bfa65e08262b96afbe53d6cf42bc326052..70fd0256a58f66122629572a72f90fb22e30bddc 100644
index 959ce2efe156c8ff2e3d1b57cde27f4da548c3ef..212ce0957d623776a11779c4a476c76bc7c1c0bd 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -219,6 +219,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -87,10 +87,10 @@ index 25ddfe8e5da65e4ac70be2820ba139e7f3852c0c..87abd6274f9da9367094bad0c28acfa4
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 2f69f4368bb0fb6d254c1f445953c8dd05d0b0aa..e70ff6389436f33f4ec1d0b238601419bddb3fe0 100644
index b27e232689b8af2f3c9f643b9bee805f9a7a0434..9c8188a5937206448479e9e29efcee7b938fb2cc 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2471,6 +2471,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2464,6 +2464,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot Start
public SocketAddress getRawAddress()
{

View File

@ -65,7 +65,7 @@ index 3356f327c9adae6c2f3354b4417f3954012c945a..0118c4ef4f5ed0e724b379b5a563e2b6
this.checkPressed(state, world, pos);
}
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
index 3c7bbfcb3a88f23056cd0db3da2a281a81dc8c85..88ca50038b483fe5c207ef5c2bf3ea87540e147e 100644
index 43ecbeaced4d50910a59b24934908ff40d894770..c5a0cefc6b7e19d8a277dbc59e54f465a994a858 100644
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
@@ -121,6 +121,7 @@ public class CactusBlock extends Block {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 901d9f47a63f5c6ddd596c7d327abd06f5a17f16..497dd11d7965c9f9a2cf991712cd30d875537240 100644
index 379be7cd3ce1808cf0cf50e50ac7e8de8c8f652c..da2a8f57b733b84106ed0818f4402d9c9d854481 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -668,8 +668,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -434,8 +434,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.serverLevelData.setClearWeatherTime(clearDuration);
this.serverLevelData.setRainTime(rainDuration);
this.serverLevelData.setThunderTime(rainDuration);
@ -19,7 +19,7 @@ index 901d9f47a63f5c6ddd596c7d327abd06f5a17f16..497dd11d7965c9f9a2cf991712cd30d8
}
@Override
@@ -1105,8 +1105,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -868,8 +868,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.serverLevelData.setThunderTime(j);
this.serverLevelData.setRainTime(k);
this.serverLevelData.setClearWeatherTime(i);
@ -30,7 +30,7 @@ index 901d9f47a63f5c6ddd596c7d327abd06f5a17f16..497dd11d7965c9f9a2cf991712cd30d8
}
this.oThunderLevel = this.thunderLevel;
@@ -1173,14 +1173,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -936,14 +936,14 @@ public class ServerLevel extends Level implements WorldGenLevel {
@VisibleForTesting
public void resetWeatherCycle() {
// CraftBukkit start
@ -95,10 +95,10 @@ index f5ac36fa54f3d3b39de103c95abb9ca3adfe8dda..59ba982dc96ce47e47399514e8f74d2b
if (weather.isCancelled()) {
return;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index dc36b7686a3d06c07a00e319a2af872bd77d49ef..2d1d2f8db7ebb0d813eea2fdb2fc0044e601aade 100644
index 6724d0b4e857a9671eac89445ceb70c070b29929..c70599006c16ea342ad1b50915cda13673431e79 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1193,7 +1193,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1164,7 +1164,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setStorm(boolean hasStorm) {
@ -107,7 +107,7 @@ index dc36b7686a3d06c07a00e319a2af872bd77d49ef..2d1d2f8db7ebb0d813eea2fdb2fc0044
this.setWeatherDuration(0); // Reset weather duration (legacy behaviour)
this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
}
@@ -1215,7 +1215,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1186,7 +1186,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setThundering(boolean thundering) {

View File

@ -48,10 +48,10 @@ index 96814e626a95e4e3c2f4df1a0339d37bb02f2e61..ba12919c3f9aec34a9e64993b143ae92
public boolean shouldDisconnect() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 046ace2307e0196d4b1dbd90714d89e92e0b5ee4..0fd9e6f740ce4224144f80027b7aa611bafc0827 100644
index 2615fbf23202c3218826d98835e327a71a5214e2..9568e922fb69ff516539aca27a599a4b2e8c647b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2113,7 +2113,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -2116,7 +2116,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
@ -209,7 +209,7 @@ index 6bb846d3ee2fb54ab3ffa116607f2a83e538460e..a65a1466dab52fca75cda16a4b22fef0
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea24d006d5f 100644
index 9c8188a5937206448479e9e29efcee7b938fb2cc..692c9235d4a6026e3598074a936972556723c244 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -342,7 +342,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -265,8 +265,8 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
+ server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM)); // Paper - AsyncTabCompleteEvent & kick event cause
return;
}
// Paper start
@@ -881,7 +881,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// CraftBukkit end
@@ -874,7 +874,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Paper start - validate pick item position
if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) {
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
@ -275,7 +275,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
return;
}
this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed
@@ -1066,7 +1066,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1059,7 +1059,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
if (byteLength > 256 * 4) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!");
@ -284,7 +284,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
return;
}
byteTotal += byteLength;
@@ -1089,14 +1089,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1082,14 +1082,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (byteTotal > byteAllowed) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
@ -301,7 +301,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
return;
}
this.lastBookTick = MinecraftServer.currentTick;
@@ -1240,7 +1240,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1233,7 +1233,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
public void handleMovePlayer(ServerboundMovePlayerPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) {
@ -310,7 +310,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
} else {
ServerLevel worldserver = this.player.serverLevel();
@@ -1660,7 +1660,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1653,7 +1653,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.dropCount++;
if (this.dropCount >= 20) {
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
@ -319,7 +319,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
return;
}
}
@@ -1943,7 +1943,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1936,7 +1936,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.resetLastActionTime();
} else {
ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
@ -328,7 +328,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
}
}
@@ -1956,7 +1956,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1949,7 +1949,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// CraftBukkit end
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
@ -337,7 +337,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
} else {
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.lastSeenMessages());
@@ -1988,7 +1988,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1981,7 +1981,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void handleChatCommand(ServerboundChatCommandPacket packet) {
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
@ -346,7 +346,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
} else {
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.lastSeenMessages());
@@ -2044,7 +2044,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2037,7 +2037,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
private void handleMessageDecodeFailure(SignedMessageChain.DecodeException exception) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to update secure chat state for {}: '{}'", this.player.getGameProfile().getName(), exception.getComponent().getString());
if (exception.shouldDisconnect()) {
@ -355,7 +355,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
} else {
this.player.sendSystemMessage(exception.getComponent().copy().withStyle(ChatFormatting.RED));
}
@@ -2092,7 +2092,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2085,7 +2085,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
if (optional.isEmpty()) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
@ -364,7 +364,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
}
return optional;
@@ -2278,7 +2278,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2271,7 +2271,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// this.chatSpamTickCount += 20;
if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) {
// CraftBukkit end
@ -373,7 +373,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
}
}
@@ -2290,7 +2290,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2283,7 +2283,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
synchronized (this.lastSeenMessages) {
if (!this.lastSeenMessages.applyOffset(packet.offset())) {
ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message acknowledgements from {}", this.player.getName().getString());
@ -382,7 +382,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
}
}
@@ -2443,7 +2443,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2436,7 +2436,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
if (i > 4096) {
@ -391,7 +391,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
}
}
@@ -2500,7 +2500,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2493,7 +2493,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Spigot Start
if ( entity == this.player && !this.player.isSpectator() )
{
@ -400,7 +400,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
return;
}
// Spigot End
@@ -2599,7 +2599,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2592,7 +2592,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// CraftBukkit end
}
} else {
@ -409,7 +409,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString());
}
}
@@ -3008,7 +3008,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -3001,7 +3001,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Paper start - auto recipe limit
if (!org.bukkit.Bukkit.isPrimaryThread()) {
if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
@ -437,7 +437,7 @@ index e70ff6389436f33f4ec1d0b238601419bddb3fe0..cde1ae539f8808ecaf28afda20dc5ea2
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index cb71aacd23696bf0bf83d2850a5f9cbd46eb1996..0ec9d49b938ff701535fadaf701dc8f3ad4d0664 100644
index 37662f2b42d1cbaac62743ff9907434670bb93ed..50318611b3fad9e7ad4a39c8746f77a7f9b19d69 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -683,7 +683,7 @@ public abstract class PlayerList {
@ -491,10 +491,10 @@ index 6724d0a1af13e97bc1d3bd94fd43fef742a0deab..20ba0a0c9eae28658888a77dd2170f62
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7b5fd058817f27ffefcdc7e3667e8258a87cbb4c..667d0f7f50f7000d71efe429e2218e0358e22698 100644
index 41e4c05325bb5ef5ce37caabb1c8a76f80d7abe2..aa145f29dfd60b19fedd4b39bc3103fb3c8fa242 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -591,7 +591,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -549,7 +549,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
org.spigotmc.AsyncCatcher.catchOp("player kick"); // Spigot
if (this.getHandle().connection == null) return;
@ -503,7 +503,7 @@ index 7b5fd058817f27ffefcdc7e3667e8258a87cbb4c..667d0f7f50f7000d71efe429e2218e03
}
// Paper start
@@ -603,10 +603,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -561,10 +561,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void kick(final net.kyori.adventure.text.Component message) {
@ -520,7 +520,7 @@ index 7b5fd058817f27ffefcdc7e3667e8258a87cbb4c..667d0f7f50f7000d71efe429e2218e03
}
}
@@ -665,7 +670,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -623,7 +628,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// Paper start - Improve chat handling
if (ServerGamePacketListenerImpl.isChatMessageIllegal(msg)) {

View File

@ -11,13 +11,13 @@ Move the tick logic into the post tick, where portaling was
designed to happen in the first place.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 99861651b918baafc1ca7d1fd17f37213272953b..5f8144b847e0fb62bd8db48c035b33c0fa9ed5d8 100644
index 4fd7cd7b2dba4047f36a52c510f12d61f281a95f..50ebb94f4403bdf532af423d5204364d538667ee 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -485,6 +485,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public boolean updatingSectionStatus = false;
// Paper end
@@ -420,6 +420,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.originWorld;
}
// Paper end - Entity origin API
+ // Paper start - make end portalling safe
+ public BlockPos portalBlock;
+ public ServerLevel portalWorld;
@ -48,10 +48,10 @@ index 99861651b918baafc1ca7d1fd17f37213272953b..5f8144b847e0fb62bd8db48c035b33c0
+ this.teleportTo(worldserver, null);
+ }
+ // Paper end - make end portalling safe
public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
@@ -2830,6 +2860,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public float getBukkitYaw() {
return this.yRot;
}
@@ -2778,6 +2808,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
this.processPortalCooldown();

View File

@ -32,7 +32,7 @@ index 5e01357208fe52c1d270c68cb19029ea0f4057bb..6d85237b21650edf1d2dc71abaf0edbe
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index ad3a289af7922bfc8d503eb1da93db72b31a03f6..8af7ef1c12a7826e607b15f1376311e9d38e7f31 100644
index f9f57f4ab75776dbaa4dc39d30e32b2c778b1955..d42f4640a53221ffa7a479bce681374527cb3a0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -362,7 +362,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] add per world spawn limits
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2d1d2f8db7ebb0d813eea2fdb2fc0044e601aade..a1557d6904304d510040b8c5ecb06b89cd2fe346 100644
index c70599006c16ea342ad1b50915cda13673431e79..eb915b7e07666ef1cad55dc32882ecc962ab2ae3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -215,6 +215,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0a7589ef5e9ac21e0d3cb077f19cd8b99fb8e00f..3f0c5ccc53663ae006ad09b4eba7f372e9caf357 100644
index 364ecb81521a9490d561faddd86aa2ac6b225d12..f795699d5bb7295adee8f28ed7837f7586f83552 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2387,7 +2387,7 @@ public class ServerPlayer extends Player {
@@ -2343,7 +2343,7 @@ public class ServerPlayer extends Player {
if (retainOwnership) {
if (!itemstack1.isEmpty()) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cde1ae539f8808ecaf28afda20dc5ea24d006d5f..3adf67c4bd427cf666bb0b79f4ea7b94c8c5453c 100644
index 692c9235d4a6026e3598074a936972556723c244..728a02bc2037f3afcdfb2755d11105b2d6687751 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1096,7 +1096,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1089,7 +1089,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Paper end - Book size limits
// CraftBukkit start
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {

View File

@ -8,7 +8,7 @@ ticket level 33 (yes getChunkIfLoaded will actually perform a chunk
load in that case).
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 497dd11d7965c9f9a2cf991712cd30d875537240..49c23f4fbafbae516f3546c200448c400a6b0d5d 100644
index da2a8f57b733b84106ed0818f4402d9c9d854481..0a7f98900cf45fdb11e64c2ed7139fcad940f0d5 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -225,7 +225,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -21,10 +21,10 @@ index 497dd11d7965c9f9a2cf991712cd30d875537240..49c23f4fbafbae516f3546c200448c40
@Override
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index c4086b17db7624489a8873ee321e7707078e5e0b..9c8a2cae9832f2503aed6c2d6e32cdc2f12029c9 100644
index 3e98a86dd56855485c7d8c26eb30f2bbace2d66c..596bcc62e5754b5a2c29de263ba2f7fd9b6e0bed 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -196,6 +196,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -187,6 +187,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return (CraftServer) Bukkit.getServer();
}

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmSwingEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 3adf67c4bd427cf666bb0b79f4ea7b94c8c5453c..6d385f169b5daab69cd40e37ffaa38416dc91223 100644
index 728a02bc2037f3afcdfb2755d11105b2d6687751..297f9731f005c93c5d8d2d1913bd3bf74afdda47 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2328,7 +2328,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2321,7 +2321,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
} // Paper end - Call interact event
// Arm swing animation

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix kick event leave message not being sent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 64b31447847d3b40ba00c4e6708d68113f2ef2bd..5114543c1510d203bfa4e684357b94585919742f 100644
index f795699d5bb7295adee8f28ed7837f7586f83552..f0f1c5b4dd4dffa29715e3cfe7225f0753713d98 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -269,7 +269,6 @@ public class ServerPlayer extends Player {
@ -50,10 +50,10 @@ index a65a1466dab52fca75cda16a4b22fef03b6207a0..0306771b8f90dcdd77f151c19c6c2d75
MinecraftServer minecraftserver = this.server;
Connection networkmanager = this.connection;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6d385f169b5daab69cd40e37ffaa38416dc91223..cfe980606a87ccad1cbf9354728a8d2e57686fa4 100644
index 297f9731f005c93c5d8d2d1913bd3bf74afdda47..ffe90271365138d6046b52cad2cf661d25d6e6d4 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1882,6 +1882,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1875,6 +1875,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@Override
public void onDisconnect(Component reason) {
@ -66,7 +66,7 @@ index 6d385f169b5daab69cd40e37ffaa38416dc91223..cfe980606a87ccad1cbf9354728a8d2e
// CraftBukkit start - Rarely it would send a disconnect line twice
if (this.processedDisconnect) {
return;
@@ -1890,11 +1896,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1883,11 +1889,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
// CraftBukkit end
ServerGamePacketListenerImpl.LOGGER.info("{} lost connection: {}", this.player.getName().getString(), reason.getString());
@ -86,7 +86,7 @@ index 6d385f169b5daab69cd40e37ffaa38416dc91223..cfe980606a87ccad1cbf9354728a8d2e
this.chatMessageChain.close();
// CraftBukkit start - Replace vanilla quit message handling with our own.
/*
@@ -1904,7 +1916,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1897,7 +1909,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
this.player.disconnect();
// Paper start - Adventure
@ -96,7 +96,7 @@ index 6d385f169b5daab69cd40e37ffaa38416dc91223..cfe980606a87ccad1cbf9354728a8d2e
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
// Paper end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 0ec9d49b938ff701535fadaf701dc8f3ad4d0664..cedfc39539f7eb7d2cc0dfeda347cf59fadd95fc 100644
index 50318611b3fad9e7ad4a39c8746f77a7f9b19d69..e4cfdba803eea5092c5064ff5dcbc668976176d0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -569,6 +569,11 @@ public abstract class PlayerList {

View File

@ -11,7 +11,7 @@ It does not make a lot of sense to damage players if they get crammed,
For those who really want it a config option is provided.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5114543c1510d203bfa4e684357b94585919742f..415a48203aa150056cb224e3eb65a1f62f0741e7 100644
index f0f1c5b4dd4dffa29715e3cfe7225f0753713d98..481732b49b9492a7010d85932554b0d466e82765 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -95,6 +95,7 @@ import net.minecraft.util.Mth;
@ -22,7 +22,7 @@ index 5114543c1510d203bfa4e684357b94585919742f..415a48203aa150056cb224e3eb65a1f6
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.Entity;
@@ -1475,7 +1476,7 @@ public class ServerPlayer extends Player {
@@ -1431,7 +1432,7 @@ public class ServerPlayer extends Player {
@Override
public boolean isInvulnerableTo(DamageSource damageSource) {

View File

@ -105,7 +105,7 @@ index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bd
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 980bf1f65db95533b757a757dcfda3d6970fcc8b..e437dac193b6aa301b35b847647ca6004334a092 100644
index b3e11cf65548bd79413620a4a6303b530e15297e..06f14b2adacdbcc4e9f24b8e1fb2224ae3925172 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -303,6 +303,7 @@ public final class CraftServer implements Server {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent AFK kick while watching end credits
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index cfe980606a87ccad1cbf9354728a8d2e57686fa4..fa6783305aae385723d6bdb83166e147b8ebcfe9 100644
index ffe90271365138d6046b52cad2cf661d25d6e6d4..b04460f710ed24ab94011e9d6b79953338d5b7e0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -390,7 +390,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View File

@ -49,10 +49,10 @@ index a2d0699e8427b2262a2396495111125eccafbb66..15db9368227dbc29d07d74e85bd126b3
}
}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 415a48203aa150056cb224e3eb65a1f62f0741e7..770f99014f3cccbbc666f0aa8530dfb545ced7b6 100644
index 481732b49b9492a7010d85932554b0d466e82765..ef957f0dcea13097e34bf8c9f223eb9790ee282c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1352,7 +1352,7 @@ public class ServerPlayer extends Player {
@@ -1308,7 +1308,7 @@ public class ServerPlayer extends Player {
} else if (this.bedBlocked(blockposition, enumdirection)) {
return Either.left(Player.BedSleepingProblem.OBSTRUCTED);
} else {
@ -61,7 +61,7 @@ index 415a48203aa150056cb224e3eb65a1f62f0741e7..770f99014f3cccbbc666f0aa8530dfb5
if (this.level().isDay()) {
return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW);
} else {
@@ -2307,44 +2307,50 @@ public class ServerPlayer extends Player {
@@ -2263,44 +2263,50 @@ public class ServerPlayer extends Player {
return this.respawnForced;
}
@ -145,7 +145,7 @@ index 415a48203aa150056cb224e3eb65a1f62f0741e7..770f99014f3cccbbc666f0aa8530dfb5
} else {
this.respawnPosition = null;
this.respawnDimension = Level.OVERWORLD;
@@ -2352,6 +2358,7 @@ public class ServerPlayer extends Player {
@@ -2308,6 +2314,7 @@ public class ServerPlayer extends Player {
this.respawnForced = false;
}
@ -154,7 +154,7 @@ index 415a48203aa150056cb224e3eb65a1f62f0741e7..770f99014f3cccbbc666f0aa8530dfb5
public SectionPos getLastSectionPos() {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index cedfc39539f7eb7d2cc0dfeda347cf59fadd95fc..a4d2ddbb9cee1682fc5d91e90d2fd0b74a47aa3c 100644
index e4cfdba803eea5092c5064ff5dcbc668976176d0..edeec3dd7887fbde9456e39c023d4a2dd9b6ffc5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -871,7 +871,7 @@ public abstract class PlayerList {
@ -187,10 +187,10 @@ index ecaa7f0b2bf795f16187f11fa27f6d5d435ccbfe..acd5ec218b8d4c096f44ae2eec1379ee
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 667d0f7f50f7000d71efe429e2218e0358e22698..75d06c92de46a8cb374985435e89bb3b03962ee4 100644
index aa145f29dfd60b19fedd4b39bc3103fb3c8fa242..85dd644ca86895e91ba639ba4974a05290e4e061 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1318,9 +1318,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -1276,9 +1276,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@Override
public void setBedSpawnLocation(Location location, boolean override) {
if (location == null) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 5f8144b847e0fb62bd8db48c035b33c0fa9ed5d8..bf9499f076e4eabc69d45d95705964daa56a570c 100644
index 50ebb94f4403bdf532af423d5204364d538667ee..fb085b7c72896bc6e5223eb2d87d1e6b435114dc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3875,20 +3875,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3823,20 +3823,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
private Stream<Entity> getIndirectPassengersStream() {
@ -43,8 +43,8 @@ index 5f8144b847e0fb62bd8db48c035b33c0fa9ed5d8..bf9499f076e4eabc69d45d95705964da
return () -> {
return this.getIndirectPassengersStream().iterator();
};
@@ -3911,6 +3925,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// Paper end - rewrite chunk system
@@ -3849,6 +3863,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean hasExactlyOnePlayerPassenger() {
+ if (this.passengers.isEmpty()) { return false; } // Paper - Optimize indirect passenger iteration

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Clear bucket NBT after dispense
diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
index 8c8d2e81f0866dc1441e181f2580852d87263bcc..d41e3e5382b17d3de41054b496c1707a926a897a 100644
index c1c57f24ccfa7bd17541f53d02293db0bce8dc5c..829c72333664da0c06ce04af93ea39bb90ce0b67 100644
--- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
+++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java
@@ -650,8 +650,7 @@ public interface DispenseItemBehavior {
@@ -656,8 +656,7 @@ public interface DispenseItemBehavior {
Item item = Items.BUCKET;
stack.shrink(1);
if (stack.isEmpty()) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index bf9499f076e4eabc69d45d95705964daa56a570c..5755c836024de4c8c25b026baa47c193a2df2a0b 100644
index fb085b7c72896bc6e5223eb2d87d1e6b435114dc..8825afb72b3d85840a15b02dbd3d914de06a62a8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3324,6 +3324,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3272,6 +3272,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
// CraftBukkit start
worldserver = shapedetectorshape.world;
@ -37,7 +37,7 @@ index bf9499f076e4eabc69d45d95705964daa56a570c..5755c836024de4c8c25b026baa47c193
if (worldserver == this.level) {
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
@@ -3343,8 +3365,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -3291,8 +3313,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (entity != null) {
entity.restoreFrom(this);

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 49c23f4fbafbae516f3546c200448c400a6b0d5d..669c9e43ee76ce2502ed49965aae2703b922f3b5 100644
index 0a7f98900cf45fdb11e64c2ed7139fcad940f0d5..dd3e5ee62da7b37b51e07796f6a1188e207d49e2 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -994,6 +994,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -757,6 +757,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
protected BlockPos findLightningTargetAround(BlockPos pos) {
@ -22,7 +22,7 @@ index 49c23f4fbafbae516f3546c200448c400a6b0d5d..669c9e43ee76ce2502ed49965aae2703
BlockPos blockposition1 = this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, pos);
Optional<BlockPos> optional = this.findLightningRod(blockposition1);
@@ -1008,6 +1013,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -771,6 +776,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!list.isEmpty()) {
return ((LivingEntity) list.get(this.random.nextInt(list.size()))).blockPosition();
} else {
@ -31,10 +31,10 @@ index 49c23f4fbafbae516f3546c200448c400a6b0d5d..669c9e43ee76ce2502ed49965aae2703
blockposition1 = blockposition1.above(2);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index a1557d6904304d510040b8c5ecb06b89cd2fe346..e03bd6419d4c28a329286edc5267b725de554105 100644
index eb915b7e07666ef1cad55dc32882ecc962ab2ae3..938b3147040a43601f425b056dc4a83ccf2564be 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -651,6 +651,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -661,6 +661,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return (LightningStrike) lightning.getBukkitEntity();
}

View File

@ -7,10 +7,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e5f265d71fe10fe1c9cb1ec95958f0c42063e51c..99b87b783dfb3d0e00e3e03e5721feaef1c1ecf0 100644
index 8825afb72b3d85840a15b02dbd3d914de06a62a8..c19cc2af8bf0d2f5a778cdd05560340fad6847e1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2113,6 +2113,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -2061,6 +2061,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}

View File

@ -9,10 +9,10 @@ chunk through it. This should also be OK from a leak prevention/
state desync POV because the TE is getting unloaded anyways.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 43f190d5e3805f7260128b1e32c904d5aa67fd64..487b5620361acd54fd36b8996235fc5be053bd09 100644
index dd3e5ee62da7b37b51e07796f6a1188e207d49e2..46e14d8bcef8ba9ba2b17f6d2e59db7247b38977 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1540,9 +1540,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1301,9 +1301,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) {
@ -28,10 +28,10 @@ index 43f190d5e3805f7260128b1e32c904d5aa67fd64..487b5620361acd54fd36b8996235fc5b
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 475ae48f553c902a6635b56faea60d81dba1b0f4..ef51bcd19c2e0a4ba89a26df4b4a21094213937a 100644
index ef957f0dcea13097e34bf8c9f223eb9790ee282c..e711bb835267e09183c2af1ac0df07b9fd5cefcd 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1626,6 +1626,18 @@ public class ServerPlayer extends Player {
@@ -1582,6 +1582,18 @@ public class ServerPlayer extends Player {
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
this.doCloseContainer();
}

View File

@ -17,10 +17,10 @@ Async catch modifications to critical entity state
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fa6783305aae385723d6bdb83166e147b8ebcfe9..27bcfe893db83bb369186ccf1d48f28e9d2cae82 100644
index b04460f710ed24ab94011e9d6b79953338d5b7e0..8c82679ced26d540f708c566796ab7ed96faee65 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1570,6 +1570,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1563,6 +1563,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set<RelativeMovement> set) { // Paper
@ -166,10 +166,10 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason});
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index e03bd6419d4c28a329286edc5267b725de554105..57b27317f28901df1bb3c10bf462d319d0c7b7c3 100644
index 938b3147040a43601f425b056dc4a83ccf2564be..605c04d10b47b71787b7f3369d4fdfbb98327c1d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1753,6 +1753,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1724,6 +1724,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
@ -177,7 +177,7 @@ index e03bd6419d4c28a329286edc5267b725de554105..57b27317f28901df1bb3c10bf462d319
if (loc == null || sound == null || category == null) return;
double x = loc.getX();
@@ -1764,6 +1765,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1735,6 +1736,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
@ -185,7 +185,7 @@ index e03bd6419d4c28a329286edc5267b725de554105..57b27317f28901df1bb3c10bf462d319
if (loc == null || sound == null || category == null) return;
double x = loc.getX();
@@ -1796,6 +1798,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1767,6 +1769,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void playSound(Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
@ -193,7 +193,7 @@ index e03bd6419d4c28a329286edc5267b725de554105..57b27317f28901df1bb3c10bf462d319
if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return;
ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
@@ -1807,6 +1810,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1778,6 +1781,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
@ -214,12 +214,12 @@ index 711f4ca8ee42a14e40af86d93a9685b4b9a2ba99..269664d3894835e5bafc39e65ee5245a
return true;
}
diff --git a/src/main/java/org/spigotmc/AsyncCatcher.java b/src/main/java/org/spigotmc/AsyncCatcher.java
index 05e94702e42b8f5c35d2a112c486d57948a3acba..d678ca116f9b81ab9d7d99a698e0ce066c132f34 100644
index 78669fa035b7537ff7e533cf32aaf2995625424f..e8e3cc48cf1c58bd8151d1f28df28781859cd0e3 100644
--- a/src/main/java/org/spigotmc/AsyncCatcher.java
+++ b/src/main/java/org/spigotmc/AsyncCatcher.java
@@ -11,6 +11,7 @@ public class AsyncCatcher
{
if ( !io.papermc.paper.util.TickThread.isTickThread() ) // Paper // Paper - rewrite chunk system
if ( (AsyncCatcher.enabled || io.papermc.paper.util.TickThread.STRICT_THREAD_CHECKS) && Thread.currentThread() != MinecraftServer.getServer().serverThread ) // Paper
{
+ MinecraftServer.LOGGER.error("Thread " + Thread.currentThread().getName() + " failed main thread check: " + reason, new Throwable()); // Paper
throw new IllegalStateException( "Asynchronous " + reason + "!" );

View File

@ -10,13 +10,13 @@ Also has a hover text on each mob category listing what entity types are
in said category
diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java
index 8ff2bcfa05641a022aceff66f2356744caa594da..b2a15f0346c84b03c8947e3231cf0d27a790ebc9 100644
index a27c90ea7af63b0d42f202ed1a7dab6e42daed9f..1fd0854fb4f8ab3b5da3cda5ddd2535a0faa6adf 100644
--- a/src/main/java/io/papermc/paper/command/PaperCommand.java
+++ b/src/main/java/io/papermc/paper/command/PaperCommand.java
@@ -42,6 +42,7 @@ public final class PaperCommand extends Command {
@@ -41,6 +41,7 @@ public final class PaperCommand extends Command {
commands.put(Set.of("fixlight"), new FixLightCommand());
commands.put(Set.of("syncloadinfo"), new SyncLoadInfoCommand());
commands.put(Set.of("dumpitem"), new DumpItemCommand());
commands.put(Set.of("debug", "chunkinfo", "holderinfo"), new ChunkDebugCommand());
+ commands.put(Set.of("mobcaps", "playermobcaps"), new MobcapsCommand());
return commands.entrySet().stream()
@ -278,10 +278,10 @@ index 4ad3a4403f497f4b437209a9e63445f0d29b09f1..28ec1cc4dec6d12627761a58d635fd51
BlockPos blockposition = NaturalSpawner.getRandomPosWithin(world, chunk);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f779364a29ff91e47c44a99533acb9d387a72b48..8d7cf6e0e24d114570967b70a1685a253bbc0f9d 100644
index 06f14b2adacdbcc4e9f24b8e1fb2224ae3925172..8bf110c0d9f4203559795d804cbee5b9a5f502e3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2279,6 +2279,11 @@ public final class CraftServer implements Server {
@@ -2274,6 +2274,11 @@ public final class CraftServer implements Server {
@Override
public int getSpawnLimit(SpawnCategory spawnCategory) {
@ -294,10 +294,10 @@ index f779364a29ff91e47c44a99533acb9d387a72b48..8d7cf6e0e24d114570967b70a1685a25
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 57b27317f28901df1bb3c10bf462d319d0c7b7c3..a059b426e2d0280a318bd1c697056352b24ee9c3 100644
index 605c04d10b47b71787b7f3369d4fdfbb98327c1d..b3a48f238e64f4de3074b1a9d7882cd5b6adfba3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1711,9 +1711,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -1682,9 +1682,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);

View File

@ -10,10 +10,10 @@ chunks did get inlined, but the standard CPS.getChunkAt
method was not inlined.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9c8a2cae9832f2503aed6c2d6e32cdc2f12029c9..709d3e5c506c9dd14f51c455eee7093fb9703168 100644
index 596bcc62e5754b5a2c29de263ba2f7fd9b6e0bed..e8b9050f9abe6f269aab775bb12993bcf18aff2a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -372,6 +372,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -363,6 +363,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Override
public final LevelChunk getChunk(int chunkX, int chunkZ) { // Paper - final to help inline

View File

@ -8,14 +8,14 @@ Lighting is purged on update anyways, so let's not add more
into the conversion process
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
index af8a8e85742497e8dac7a59a3cd5938e09580e45..cccc3741227402b24c76d31a339d01323610b9f0 100644
index ab6b4491d4278b3839b7363d9890bd12a757e4cc..eebaf98bc0fa4696af59b2a79563beb73501a554 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/ChunkStorage.java
@@ -51,6 +51,7 @@ public class ChunkStorage implements AutoCloseable {
@@ -44,6 +44,7 @@ public class ChunkStorage implements AutoCloseable {
// CraftBukkit start
private boolean check(ServerChunkCache cps, int x, int z) {
+ if (true) return true; // Paper - Perf: this isn't even needed anymore, light is purged updating to 1.14+, why are we holding up the conversion process reading chunk data off disk - return true, we need to set light populated to true so the converter recognizes the chunk as being "full"
ChunkPos pos = new ChunkPos(x, z);
if (cps != null) {
//com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread"); // Paper - this function is now MT-Safe
com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread");

View File

@ -7,10 +7,10 @@ Reference2BooleanOpenHashMap is going to have
better lookups than HashMap.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 69d140fbcccc9054f15716e35a7b854b387fe21d..f7ebb560a3f8aebb5e35397814eaa7af098897c3 100644
index 9706e08511fcfd72abd5e92d7df54dc199451499..3dc4ee8b39aabf1fdaa82d5a195691d59dd1ffa5 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1119,7 +1119,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -1686,7 +1686,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
final Entity entity;
private final int range;
SectionPos lastSectionPos;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e6a3f377762db8f2f58cb6851b8f713ce591b29f..6ece18d5429217ee53ca5ae5c0eb7450aa5f63ec 100644
index 46e14d8bcef8ba9ba2b17f6d2e59db7247b38977..2d0d1da27152654ab43aba0ffe51887137190a2e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2610,6 +2610,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2356,6 +2356,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot end
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message

View File

@ -6,12 +6,12 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 27bcfe893db83bb369186ccf1d48f28e9d2cae82..0280c215f4e502cd0471523b040d8b54c50f7ab8 100644
index 8c82679ced26d540f708c566796ab7ed96faee65..277da3de55663e46fec47a3a41345bcd2a111d28 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -733,6 +733,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -726,6 +726,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
return;
}
// Paper end
// CraftBukkit end
+ // Paper start - Don't suggest if tab-complete is disabled
+ if (org.spigotmc.SpigotConfig.tabComplete < 0) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Ensure valid vehicle status
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index bb313280236fb5c7dd2713a21edd3694e01a4fd1..20cdb362592714891d7676fbea6096dfe30447b0 100644
index e711bb835267e09183c2af1ac0df07b9fd5cefcd..1287a714b50723a8512428d62c4d39edcc396ed9 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -572,7 +572,7 @@ public class ServerPlayer extends Player {
@@ -528,7 +528,7 @@ public class ServerPlayer extends Player {
}
}

View File

@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw.
This issue only applies to players.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 99b87b783dfb3d0e00e3e03e5721feaef1c1ecf0..0dd2fcc51b7d07f68fdc630f7c73dcdc32282e90 100644
index c19cc2af8bf0d2f5a778cdd05560340fad6847e1..48b1648b749f884d29abe8d48865860791eda9dc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1830,6 +1830,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1778,6 +1778,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
@ -19,7 +19,7 @@ index 99b87b783dfb3d0e00e3e03e5721feaef1c1ecf0..0dd2fcc51b7d07f68fdc630f7c73dcdc
}
public void absMoveTo(double x, double y, double z) {
@@ -1868,6 +1869,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -1816,6 +1817,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setXRot(pitch);
this.setOldPosAndRot();
this.reapplyPosition();

View File

@ -13,7 +13,7 @@ the material type of the block at that location.
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index d156f7cc71050f13b2feca00c52ca6b64572b60e..e3557f4c8cee7c88b3e352cd246078da7762effc 100644
index 53443b472d21633f49c102b330c8406c92f09d8d..4893eaf93738da860014ddf3ad003334c9ebc9fa 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -247,7 +247,7 @@ public abstract class BlockEntity {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Configurable feature seeds
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
index 1080e1f67afe5574baca0df50cdb1d029a7a586a..a2f71a6d1a9e98133dff6cd0f625da9435a8af14 100644
index 38f01952153348d937e326da0ec102cd9b0f80af..2d4090b95193de431f56eaafd4d4561ecccdf99c 100644
--- a/src/main/java/co/aikar/timings/TimingsExport.java
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -288,7 +288,7 @@ public class TimingsExport extends Thread {
@@ -284,7 +284,7 @@ public class TimingsExport extends Thread {
JSONObject object = new JSONObject();
for (String key : config.getKeys(false)) {
String fullKey = (parentKey != null ? parentKey + "." + key : key);
@ -19,7 +19,7 @@ index 1080e1f67afe5574baca0df50cdb1d029a7a586a..a2f71a6d1a9e98133dff6cd0f625da94
}
final Object val = config.get(key);
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
index 180f8ae443d1ea44a748c7f3ebb82a0bab8d31f1..f8306b4d0d1c0a4e7336bd5f99222f59920ab796 100644
index a6d5b3fa7e3437e0aec54eec4079e9f3267c64b8..567103d635087bf894a8c0473baf03bdb5ff052f 100644
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
@@ -431,7 +431,14 @@ public abstract class ChunkGenerator {

View File

@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..6bd0afddbcc461149dfe9a5c7a86fff6
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 70fd0256a58f66122629572a72f90fb22e30bddc..3cc0aa9fa1ba11d85ce07013de86ad6f89c52f67 100644
index 212ce0957d623776a11779c4a476c76bc7c1c0bd..c39b19bee3aca093a2087e19875a50ff21cf1ab3 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -179,6 +179,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface

View File

@ -5,10 +5,10 @@ Subject: [PATCH] don't attempt to teleport dead entities
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0dd2fcc51b7d07f68fdc630f7c73dcdc32282e90..1b9b3e8b2a85c6e921ec665c95061f2d3e3f678d 100644
index 48b1648b749f884d29abe8d48865860791eda9dc..021d3803ffbf4fb0a6de92c13406c5316e09c4c1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -757,7 +757,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -705,7 +705,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start
public void postTick() {
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle

View File

@ -18,10 +18,10 @@ index 0a86e72e50d4aab7d19f588c3f11d7465c6fe817..c881d6ea6acbcbd1414a0b7d6b5a2607
}
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 0280c215f4e502cd0471523b040d8b54c50f7ab8..5aa9f337e1e251485310436f87786b02d181bcbb 100644
index 277da3de55663e46fec47a3a41345bcd2a111d28..7fa4b7e5980d07ede8a3a7640f361dfa57d8927a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2561,8 +2561,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -2554,8 +2554,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Refresh the current entity metadata
entity.getEntityData().refresh(ServerGamePacketListenerImpl.this.player);
// SPIGOT-7136 - Allays

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9ad1645c143d91ae9e08dfe3d875c9b0aa4d0844..492867fb2bf9a94f8fd5fac7d02f7d1538edcf21 100644
index 8bf110c0d9f4203559795d804cbee5b9a5f502e3..33a3a46e275a6583ca11dfd87bd9fb7e5b60914a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2459,6 +2459,88 @@ public final class CraftServer implements Server {
@@ -2454,6 +2454,88 @@ public final class CraftServer implements Server {
return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME));
}

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Fix ChunkSnapshot#isSectionEmpty(int) and optimize
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 545b14f02ac72dda30891d681eba585d19fd5e1d..d4e0ef75dd12709a0dcf9193821c30b8943e6c36 100644
index e38643853220cabeac6c30912a9ae4bc1c018d5f..1eff5e4800ad3b628a42113fb3ba67458e56a40d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -291,13 +291,17 @@ public class CraftChunk implements Chunk {
@@ -335,13 +335,17 @@ public class CraftChunk implements Chunk {
PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
Registry<net.minecraft.world.level.biome.Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registries.BIOME);
@ -31,7 +31,7 @@ index 545b14f02ac72dda30891d681eba585d19fd5e1d..d4e0ef75dd12709a0dcf9193821c30b8
LevelLightEngine lightengine = this.worldServer.getLightEngine();
DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(this.x, chunk.getSectionYFromSectionIndex(i), this.z)); // SPIGOT-7498: Convert section index
@@ -316,8 +320,7 @@ public class CraftChunk implements Chunk {
@@ -360,8 +364,7 @@ public class CraftChunk implements Chunk {
}
if (biome != null) {

Some files were not shown because too many files have changed in this diff Show More