Readd anti xray and oversized block entity patches

This commit is contained in:
Nassim Jahnke 2023-09-24 12:35:16 +10:00
parent 6be43952eb
commit 2ec643a53c
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
730 changed files with 245 additions and 264 deletions

View File

@ -9,7 +9,7 @@ creating too large of a packet to sed.
Co authored by Spottedleaf
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index f47eeb70661661610ef1a96dd9da67785825c126..0ef3e9b472e35bd2572b04722781abf7d4a1094b 100644
index f47eeb70661661610ef1a96dd9da67785825c126..0711ad682206e783fd0a1e566828670321f297e2 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -24,6 +24,14 @@ public class ClientboundLevelChunkPacketData {
@ -17,10 +17,10 @@ index f47eeb70661661610ef1a96dd9da67785825c126..0ef3e9b472e35bd2572b04722781abf7
private final byte[] buffer;
private final List<ClientboundLevelChunkPacketData.BlockEntityInfo> blockEntitiesData;
+ // Paper start
+ private final java.util.List<net.minecraft.network.protocol.Packet> extraPackets = new java.util.ArrayList<>();
+ private final java.util.List<net.minecraft.network.protocol.Packet<?>> extraPackets = new java.util.ArrayList<>();
+ private static final int TE_LIMIT = Integer.getInteger("Paper.excessiveTELimit", 750);
+
+ public List<net.minecraft.network.protocol.Packet> getExtraPackets() {
+ public List<net.minecraft.network.protocol.Packet<?>> getExtraPackets() {
+ return this.extraPackets;
+ }
+ // Paper end
@ -47,7 +47,7 @@ index f47eeb70661661610ef1a96dd9da67785825c126..0ef3e9b472e35bd2572b04722781abf7
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
index 26e46d751c8f8162c2bafe2fc109fc91dc4b7c0f..ff42a3e76500ad6e087b7f1cd6ec45acde124180 100644
index 26e46d751c8f8162c2bafe2fc109fc91dc4b7c0f..be89e5b8c1ea7f85aef267a15986affa5fa1fd4b 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
@@ -57,4 +57,11 @@ public class ClientboundLevelChunkWithLightPacket implements Packet<ClientGamePa
@ -57,7 +57,7 @@ index 26e46d751c8f8162c2bafe2fc109fc91dc4b7c0f..ff42a3e76500ad6e087b7f1cd6ec45ac
+
+ // Paper start - handle over-sized TE packets
+ @Override
+ public java.util.List<Packet> getExtraPackets() {
+ public java.util.List<Packet<?>> getExtraPackets() {
+ return this.chunkData.getExtraPackets();
+ }
+ // Paper end

View File

@ -1013,7 +1013,7 @@ index 6cff1a98dc7cf33947ec760dbc3d3d0ec5db5f6c..51f647de153255c919b1440338cf1b3e
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
index 0ef3e9b472e35bd2572b04722781abf7d4a1094b..c08440826d84f97412e2587cb98daae04e1bdd32 100644
index 0711ad682206e783fd0a1e566828670321f297e2..bf6cdc08367fc26716e7904162a21e63fecab3ed 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java
@@ -33,7 +33,10 @@ public class ClientboundLevelChunkPacketData {
@ -1063,7 +1063,7 @@ index 0ef3e9b472e35bd2572b04722781abf7d4a1094b..c08440826d84f97412e2587cb98daae0
}
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
index ff42a3e76500ad6e087b7f1cd6ec45acde124180..978fc83b209ae831ba1d6315cad1adeefe58a98c 100644
index be89e5b8c1ea7f85aef267a15986affa5fa1fd4b..43472855136f26b282d94fd241853d862a19ae17 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkWithLightPacket.java
@@ -13,13 +13,30 @@ public class ClientboundLevelChunkWithLightPacket implements Packet<ClientGamePa
@ -1099,46 +1099,11 @@ index ff42a3e76500ad6e087b7f1cd6ec45acde124180..978fc83b209ae831ba1d6315cad1adee
}
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 5cc0a39622a265e42e6b7d20e81144d1acce59b7..e0c9b9b61fa718d81d6e4438d7c12a833dfd7b64 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -677,7 +677,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
}
- public void updateChunkTracking(ServerPlayer player, ChunkPos pos, MutableObject<ClientboundLevelChunkWithLightPacket> packet, boolean oldWithinViewDistance, boolean newWithinViewDistance) { // Paper - public
+ public void updateChunkTracking(ServerPlayer player, ChunkPos pos, MutableObject<java.util.Map<Object, ClientboundLevelChunkWithLightPacket>> packet, boolean oldWithinViewDistance, boolean newWithinViewDistance) { // Paper - public // Paper - Anti-Xray - Bypass
io.papermc.paper.util.TickThread.ensureTickThread(this.level, pos, "May not update chunk tracking for chunk async"); // Paper - replace chunk loader system
io.papermc.paper.util.TickThread.ensureTickThread(player, "May not update chunk tracking for player async"); // Paper - replace chunk loader system
if (player.level() == this.level) {
@@ -1185,12 +1185,17 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
});
}
- private void playerLoadedChunk(ServerPlayer player, MutableObject<ClientboundLevelChunkWithLightPacket> cachedDataPacket, LevelChunk chunk) {
- if (cachedDataPacket.getValue() == null) {
- cachedDataPacket.setValue(new ClientboundLevelChunkWithLightPacket(chunk, this.lightEngine, (BitSet) null, (BitSet) null));
+ // Paper start - Anti-Xray - Bypass
+ private void playerLoadedChunk(ServerPlayer player, MutableObject<java.util.Map<Object, ClientboundLevelChunkWithLightPacket>> cachedDataPackets, LevelChunk chunk) {
+ if (cachedDataPackets.getValue() == null) {
+ cachedDataPackets.setValue(new java.util.HashMap<>());
}
- player.trackChunk(chunk.getPos(), (Packet) cachedDataPacket.getValue());
+ Boolean shouldModify = chunk.getLevel().chunkPacketBlockController.shouldModify(player, chunk);
+ player.trackChunk(chunk.getPos(), (Packet) cachedDataPackets.getValue().computeIfAbsent(shouldModify, (s) -> {
+ return new ClientboundLevelChunkWithLightPacket(chunk, this.lightEngine, (BitSet) null, (BitSet) null, (Boolean) s);
+ }));
+ // Paper end
DebugPackets.sendPoiPacketsForChunk(this.level, chunk.getPos());
List<Entity> list = Lists.newArrayList();
List<Entity> list1 = Lists.newArrayList();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index b12e9da3eebda396769b30f4b7e37a78f3bcb060..62ea2bb2fdd1f2de31b08c88193887989fbd3ece 100644
index 35e2688f9252fbc12b69519e5e5fbaec5ff82e42..041a6b20fa88852cd5b37438f2ddf30517b95820 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -564,7 +564,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -566,7 +566,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
@ -1169,6 +1134,22 @@ index bdf11a98614c9c12d3112f437651be81d0d9872a..58a1a54b676922ef0862dcab98e7aada
}
public void destroyAndAck(BlockPos pos, int sequence, String reason) {
diff --git a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
index 5de5209e04d631bd6a50e28e8d3abebf148252c1..19b3f4fa7678a038bf25efc2a8b46ddad0193fde 100644
--- a/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
+++ b/src/main/java/net/minecraft/server/network/PlayerChunkSender.java
@@ -85,7 +85,10 @@ 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);
- handler.send(new ClientboundLevelChunkWithLightPacket(chunk, world.getLightEngine(), (BitSet)null, (BitSet)null));
+ // Paper start - Anti-Xray
+ final boolean shouldModify = world.chunkPacketBlockController.shouldModify(handler.player, chunk);
+ handler.send(new ClientboundLevelChunkWithLightPacket(chunk, world.getLightEngine(), (BitSet)null, (BitSet)null, shouldModify));
+ // Paper end - Anti-Xray
ChunkPos chunkPos = chunk.getPos();
DebugPackets.sendPoiPacketsForChunk(world, chunkPos);
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9a6ed3aa55f988ed30669fab2a2513741eda399b..7a1886585bd00dc8213ce22130b8b6fea52c5cf6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
@ -1232,7 +1213,7 @@ index 525c89bc926f13af6f94fc46c897525e37477eca..8b96d1b7548d354fbcabe6d1b5e9d6c3
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 704f0500649acdbff2caf94f702a6685ecf4c986..24a1d04d01d01262facbac9c3683c21b7f54fd6d 100644
index cf910b466a4b75c0b9219abef5c9bff30793d7bf..1bb82df6602bddd3f5785c800124d2a3096c0f8d 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -90,7 +90,7 @@ public class LevelChunk extends ChunkAccess {
@ -1282,10 +1263,10 @@ index 2c3ea88bac229df67bd742e16d2106d80bcc8889..4eeb719b40ff1c18a7cdda7ecc6b135d
public int getSerializedSize() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0f1fe0860 100644
index 1219200cd915d6239a32a2bd09d325cd8fa9b346..98e720a21432fff7fce8653095a56e2ef56f1d30 100644
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
@@ -29,6 +29,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -30,6 +30,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
return 0;
};
public final IdMap<T> registry;
@ -1293,7 +1274,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
private volatile PalettedContainer.Data<T> data;
private final PalettedContainer.Strategy strategy;
private final ThreadingDetector threadingDetector = new ThreadingDetector("PalettedContainer");
@@ -41,14 +42,19 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -42,14 +43,19 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
this.threadingDetector.checkAndUnlock();
}
@ -1316,7 +1297,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
return result;
});
};
@@ -65,19 +71,52 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -66,19 +72,52 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
});
}
@ -1372,7 +1353,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
this.strategy = paletteProvider;
this.registry = idList;
this.data = this.createOrReuseData((PalettedContainer.Data<T>)null, 0);
@@ -92,11 +131,33 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -93,11 +132,33 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@Override
public int onResize(int newBits, T object) {
PalettedContainer.Data<T> data = this.data;
@ -1407,7 +1388,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
public T getAndSet(int x, int y, int z, T value) {
this.acquire();
@@ -166,25 +227,34 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -167,25 +228,34 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
data.palette.read(buf);
buf.readLongArray(data.storage.getRaw());
this.data = data;
@ -1445,7 +1426,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
List<T> list = serialized.paletteEntries();
int i = paletteProvider.size();
int j = paletteProvider.calculateBitsForSerialization(idList, list.size());
@@ -224,7 +294,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -225,7 +295,7 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
}
}
@ -1454,7 +1435,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
}
@Override
@@ -284,12 +354,12 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
@@ -285,12 +355,12 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
}
public PalettedContainer<T> copy() {
@ -1469,8 +1450,8 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
}
@Override
@@ -333,9 +403,18 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
return 1 + this.palette.getSerializedSize() + FriendlyByteBuf.getVarIntSize(this.storage.getSize()) + this.storage.getRaw().length * 8;
@@ -334,9 +404,18 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
return 1 + this.palette.getSerializedSize() + VarInt.getByteSize(this.storage.getRaw().length) + this.storage.getRaw().length * 8;
}
- public void write(FriendlyByteBuf buf) {
@ -1482,7 +1463,7 @@ index cd82985b0aa821dccc0484f328407381d58ec81f..5f832a684067f4770ade1f24a29047f0
+ if (chunkPacketInfo != null) {
+ chunkPacketInfo.setBits(chunkSectionIndex, this.configuration.bits());
+ chunkPacketInfo.setPalette(chunkSectionIndex, this.palette);
+ chunkPacketInfo.setIndex(chunkSectionIndex, buf.writerIndex() + FriendlyByteBuf.getVarIntSize(this.storage.getRaw().length));
+ chunkPacketInfo.setIndex(chunkSectionIndex, buf.writerIndex() + VarInt.getByteSize(this.storage.getRaw().length));
+ }
+ // Paper end
+
@ -1506,7 +1487,7 @@ index 9a2bf744abd8916d492e901be889223591bac3fd..1dd415c96d17eff8e7555c33d3c52e57
int getSerializedSize();
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 0d8cfc0808a8f204d57cec40929b489099eca815..dec862552b08e6b9f9ad1f88db1e07dcc43d7fa3 100644
index 982fb3ef071d6a66f16744717e8e146bef6d9e8c..02beedb84a8bec001270116c6ce496db012e6b8a 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
@@ -71,7 +71,7 @@ import org.slf4j.Logger;
@ -1560,10 +1541,10 @@ index 0d8cfc0808a8f204d57cec40929b489099eca815..dec862552b08e6b9f9ad1f88db1e07dc
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index b738e1f7debac7d70910d5ac908ca9d4f60640d5..269ebe8e8826a0c89e471cb59b503900d7ebe0fa 100644
index d10dcf5b9c987bbd4761470c16c9d4693ccf896d..adee86c79f9db0a93691ec338791d7c75ab2dd4b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -52,7 +52,7 @@ public class CraftChunk implements Chunk {
@@ -53,7 +53,7 @@ public class CraftChunk implements Chunk {
private final ServerLevel worldServer;
private final int x;
private final int z;
@ -1573,10 +1554,10 @@ index b738e1f7debac7d70910d5ac908ca9d4f60640d5..269ebe8e8826a0c89e471cb59b503900
public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 535880a9dc3ccbf8d6f1b185a695011a347bdd88..06e0904b47838c4bed2ae85a8f329e3035543b5e 100644
index fc1dcd6aae389d89ab2c0233448ea64b50c065a9..5b097b8cef1a2b71e83be6f23abf088af20195ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2275,7 +2275,7 @@ public final class CraftServer implements Server {
@@ -2277,7 +2277,7 @@ public final class CraftServer implements Server {
public ChunkGenerator.ChunkData createChunkData(World world) {
Preconditions.checkArgument(world != null, "World cannot be null");
ServerLevel handle = ((CraftWorld) world).getHandle();
@ -1586,7 +1567,7 @@ index 535880a9dc3ccbf8d6f1b185a695011a347bdd88..06e0904b47838c4bed2ae85a8f329e30
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index f259f6609cd87a210451ddf4ea00a72718d1efd0..b34067a6bc3bf61ca94929bb8e9677deef686077 100644
index 0a9cf69ce0983f167ce63dc58eace455561da8e7..83df374d5f471a9a40c670a7496a8a03970d10a3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -418,11 +418,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View File

@ -312,7 +312,7 @@ index 2d44b8a98216f879f2bc89fba1dad53cd5558ff9..7881a34e01dd6c8e31b55577bb9323a0
chunkproviderserver_b.managedBlock(completablefuture::isDone);
io.papermc.paper.chunk.system.scheduling.ChunkTaskScheduler.popChunkWait(); // Paper - async chunk debug // Paper - rewrite chunk system
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 35e2688f9252fbc12b69519e5e5fbaec5ff82e42..e7847e03b94fed1a76f8a57d6b61f5f01a87615b 100644
index 041a6b20fa88852cd5b37438f2ddf30517b95820..88abc0df7f5b9e285b10f412b58422b326b0a99a 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -645,6 +645,13 @@ public class ServerLevel extends Level implements WorldGenLevel {

View File

@ -8,7 +8,7 @@ faster on its own, however removing the try catch makes it
easier to inline due to code size
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index cf910b466a4b75c0b9219abef5c9bff30793d7bf..7d85d805bdc7bb67dae2cab8bcd38368f519a85c 100644
index 1bb82df6602bddd3f5785c800124d2a3096c0f8d..95531e115f69f52cb6ec55c6e4bc34fb109758c4 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -380,18 +380,20 @@ public class LevelChunk extends ChunkAccess {
@ -47,10 +47,10 @@ index cf910b466a4b75c0b9219abef5c9bff30793d7bf..7d85d805bdc7bb67dae2cab8bcd38368
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
index 2c3ea88bac229df67bd742e16d2106d80bcc8889..789664d53584c7d958572c63db22f904fb411a58 100644
index 4eeb719b40ff1c18a7cdda7ecc6b135dbedd626e..b8fee4f8a0cfe32b9ef7f3f3cf818cbaec0d3fca 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
@@ -43,7 +43,7 @@ public class LevelChunkSection {
@@ -46,7 +46,7 @@ public class LevelChunkSection {
}
public FluidState getFluidState(int x, int y, int z) {

View File

@ -184,7 +184,7 @@ index 4d3cd4a5dbf7adb482e60dc88ededdaccf558061..951e283d38cb7601049ac6f24385acde
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index fc1dcd6aae389d89ab2c0233448ea64b50c065a9..6e986a657af35ce6175c30abd7c68e3e3a878b83 100644
index 5b097b8cef1a2b71e83be6f23abf088af20195ba..6c213d609972ac2fd9052057c07add57596d41b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2532,6 +2532,16 @@ public final class CraftServer implements Server {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6e986a657af35ce6175c30abd7c68e3e3a878b83..79839c8e98e0489391579960b08aef055da931e4 100644
index 6c213d609972ac2fd9052057c07add57596d41b0..9a63b95ee80da386c1055976ffed8e032b67c903 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2763,5 +2763,10 @@ public final class CraftServer implements Server {

View File

@ -25,7 +25,7 @@ index 1f30d06781cea0855be26784c239e71ed1a2f6c3..91373583904a22bc28c82cf3dfec9f60
EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e7847e03b94fed1a76f8a57d6b61f5f01a87615b..282d94ab6da3cefa68a7caee88d726ffa2f73b83 100644
index 88abc0df7f5b9e285b10f412b58422b326b0a99a..19e7424d3098625b967e9fabb9681ffd9f09d16c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2466,7 +2466,7 @@ public class ServerLevel extends Level implements WorldGenLevel {

View File

@ -296,10 +296,10 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9a6ed3aa55f988ed30669fab2a2513741eda399b..a9a4e27178a1d83812720f0d4d695b0d32badaf7 100644
index 7a1886585bd00dc8213ce22130b8b6fea52c5cf6..52a44510d0499df56d2ebef0963fe8164eda7301 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -901,6 +901,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -904,6 +904,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {
@ -308,7 +308,7 @@ index 9a6ed3aa55f988ed30669fab2a2513741eda399b..a9a4e27178a1d83812720f0d4d695b0d
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 7d85d805bdc7bb67dae2cab8bcd38368f519a85c..793077e38a0bced4f78d41c0555487cd955f45e9 100644
index 95531e115f69f52cb6ec55c6e4bc34fb109758c4..cd725cdfe37eb53eea78f110d5d3ca00342781c5 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1180,6 +1180,7 @@ public class LevelChunk extends ChunkAccess {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose game version
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 79839c8e98e0489391579960b08aef055da931e4..eb74938bd7429e19d675557626fe8fe3f1f691a3 100644
index 9a63b95ee80da386c1055976ffed8e032b67c903..c4c0e55920f0e833f5a8c77ce199cbb271dd3313 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -584,6 +584,13 @@ public final class CraftServer implements Server {

View File

@ -74,7 +74,7 @@ index ed80d9551cd7cc1ec26a5d5fd7bc185b38fddd78..77e19f345bf68d12686a65e669cd597c
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index eb74938bd7429e19d675557626fe8fe3f1f691a3..e0adcbfb44284602c60bd140b5232a6e1c3b9c8f 100644
index c4c0e55920f0e833f5a8c77ce199cbb271dd3313..633cd70f8390c4aa9a9b52054f8b58106ae079e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1008,6 +1008,7 @@ public final class CraftServer implements Server {

View File

@ -536,7 +536,7 @@ index f43e5a83b9220eb23a777fa7490b49aac440bea0..1f8dcc331505890ba72777b5d0cda242
paperConfigurations.initializeWorldDefaultsConfiguration();
org.spigotmc.WatchdogThread.doStart(org.spigotmc.SpigotConfig.timeoutTime, org.spigotmc.SpigotConfig.restartOnCrash);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 282d94ab6da3cefa68a7caee88d726ffa2f73b83..5efd4d512f0a5ea90ff0f3131a91271310da8be0 100644
index 19e7424d3098625b967e9fabb9681ffd9f09d16c..8467ea174dd48010b94b3f3c84ce097ecbb2ef14 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -221,7 +221,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -612,7 +612,7 @@ index 5db27d7bcaaa2eeaeeb08401513d8d23f6cb63c7..ce43cb0152ba07c6c21e08142d65813d
}
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 793077e38a0bced4f78d41c0555487cd955f45e9..7fccb874ca2de82cc652a440bd250d0d1295397d 100644
index cd725cdfe37eb53eea78f110d5d3ca00342781c5..c4d2036d51fe16b640605ae26a2b71323758cc26 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -603,7 +603,7 @@ public class LevelChunk extends ChunkAccess {

View File

@ -792,7 +792,7 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..3f081183521603824430709886a9cc31
LOOK,
JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e0adcbfb44284602c60bd140b5232a6e1c3b9c8f..f9672add712045eb53d46ff849ba9caf72149a02 100644
index 633cd70f8390c4aa9a9b52054f8b58106ae079e6..83ff2373ba5ec4b862170e0c1ff2d84deb7df5eb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2776,5 +2776,11 @@ public final class CraftServer implements Server {

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