[ci skip] Move some disruptive patches back

This commit is contained in:
Nassim Jahnke 2024-01-23 12:06:27 +01:00
parent 25013d9970
commit 484d6bfb4e
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
686 changed files with 532 additions and 564 deletions

View file

@ -13,7 +13,7 @@ By skipping this, we avoid potential for a large spike on server start.
public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V public net.minecraft.server.level.ServerPlayer fudgeSpawnLocation(Lnet/minecraft/server/level/ServerLevel;)V
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d70316c45bd657243d6c998723f6bb1324b6a880..5c3373863bd91682bd7facd3eb57580b33e160b7 100644 index 3fbd65849649d77f9ef8920fcd7ab32c829f91c6..d7c5697ab781bb0c1cb3cb60685dca2466e966d3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -385,7 +385,7 @@ public class ServerPlayer extends Player { @@ -385,7 +385,7 @@ public class ServerPlayer extends Player {
@ -35,7 +35,7 @@ index d70316c45bd657243d6c998723f6bb1324b6a880..5c3373863bd91682bd7facd3eb57580b
this.gameMode.setLevel((ServerLevel) world); this.gameMode.setLevel((ServerLevel) world);
} }
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 37b53bfe58689f498a48ad5e0e59d98462ccdd7f..201331acd9fae6af27f44c072379c48485b3be07 100644 index 71619422fdb212b3aad8cf64a3a417168e3e8d2d..05983ba80532f3c0235af7e712948edf4d8f021b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -226,6 +226,7 @@ public abstract class PlayerList { @@ -226,6 +226,7 @@ public abstract class PlayerList {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent opening inventories when frozen
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 5c3373863bd91682bd7facd3eb57580b33e160b7..cc2378916009f961fb70d5b4b1bd5bb6867de792 100644 index d7c5697ab781bb0c1cb3cb60685dca2466e966d3..36b4512c7f5e8d7a21b94b1eda3ec13a8d7113f2 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -701,7 +701,7 @@ public class ServerPlayer extends Player { @@ -701,7 +701,7 @@ public class ServerPlayer extends Player {

View file

@ -12,7 +12,7 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Co-authored-by: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index fa496424e48c73672605b2128ec2bd3a6be86889..1782ffbf08d362b98d648c296f99fd2c49e4d8cf 100644 index b813357da558649c2244af524f79141fdc7f997e..ddbb823a5f1ac6318b6931fef2140b7e16e61056 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3398,10 +3398,24 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3398,10 +3398,24 @@ public abstract class LivingEntity extends Entity implements Attackable {

View file

@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index cc2378916009f961fb70d5b4b1bd5bb6867de792..4de3de5b195698cc804d73307a2483c83f48525e 100644 index 36b4512c7f5e8d7a21b94b1eda3ec13a8d7113f2..0a75cba1b0b5a85826bd60615e3f09d2f41cc6a3 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -386,7 +386,7 @@ public class ServerPlayer extends Player { @@ -386,7 +386,7 @@ public class ServerPlayer extends Player {

View file

@ -31,7 +31,7 @@ delays anymore.
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 37e6b841b3c3d8720a1947065d4fada8c25ec2cf..2785619ed6d04e06a25bfbb2a7fbd99f81c1f858 100644 index e3146ae94ae55764fcd7ec650a44d457889c179d..9ddad716d641d649e09c094795240bd2e8c926b9 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java --- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -996,6 +996,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -996,6 +996,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -43,7 +43,7 @@ index 37e6b841b3c3d8720a1947065d4fada8c25ec2cf..2785619ed6d04e06a25bfbb2a7fbd99f
EntityType<?> entitytypes = entity.getType(); EntityType<?> entitytypes = entity.getType();
int i = entitytypes.clientTrackingRange() * 16; int i = entitytypes.clientTrackingRange() * 16;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 4de3de5b195698cc804d73307a2483c83f48525e..c87e5dd12b5931f9d06bd70a3dd591882a5c1f17 100644 index 0a75cba1b0b5a85826bd60615e3f09d2f41cc6a3..b5dcb539548ca35d7c8a076d474a5c679a61c071 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -271,6 +271,7 @@ public class ServerPlayer extends Player { @@ -271,6 +271,7 @@ public class ServerPlayer extends Player {
@ -55,7 +55,7 @@ index 4de3de5b195698cc804d73307a2483c83f48525e..c87e5dd12b5931f9d06bd70a3dd59188
// CraftBukkit end // CraftBukkit end
public boolean isRealPlayer; // Paper public boolean isRealPlayer; // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 54a82f30fd8a4712bcf7ffeccab8ce3075f55f83..2af14ca8c9008da254ddef591f0aff9e4aba8cd5 100644 index 05983ba80532f3c0235af7e712948edf4d8f021b..dc6774fdc215de6a157b64678aec5a79344084e9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -295,6 +295,12 @@ public abstract class PlayerList { @@ -295,6 +295,12 @@ public abstract class PlayerList {

View file

@ -10,7 +10,7 @@ Co-authored-by: Wyatt Childers <wchilders@nearce.com>
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 2af14ca8c9008da254ddef591f0aff9e4aba8cd5..805759ae7d92f690cea4c700c914769d39e3c0b6 100644 index dc6774fdc215de6a157b64678aec5a79344084e9..7750c1980ea7e211a35ad077b95ab0e206900e17 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -194,7 +194,7 @@ public abstract class PlayerList { @@ -194,7 +194,7 @@ public abstract class PlayerList {
@ -87,10 +87,10 @@ index 2af14ca8c9008da254ddef591f0aff9e4aba8cd5..805759ae7d92f690cea4c700c914769d
} }
// Paper end - Entity#getEntitySpawnReason // Paper end - Entity#getEntitySpawnReason
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 538931a474841e7efae505f5aeae58715108da1b..ee55a63edd38c9919d4dfdc8434ba80f697ba0c0 100644 index b6b4be7f49ae756ebbda59e55dee98000aec2314..0d7dff8ca6a3d68fdcbf300fb2f65b1d08c429b2 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2336,27 +2336,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2335,27 +2335,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
// CraftBukkit end // CraftBukkit end

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 1782ffbf08d362b98d648c296f99fd2c49e4d8cf..69f7cdb2c507ba45dc4a689d4f33c059a57907a1 100644 index ddbb823a5f1ac6318b6931fef2140b7e16e61056..e309d74047b039e595cb59396710f68490a2249a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2190,7 +2190,16 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -2190,7 +2190,16 @@ public abstract class LivingEntity extends Entity implements Attackable {

View file

@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed. same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ee55a63edd38c9919d4dfdc8434ba80f697ba0c0..be9b96f6b725c53aec5c67c8387305d52da3acfd 100644 index 0d7dff8ca6a3d68fdcbf300fb2f65b1d08c429b2..d0f46b955041487ce1cec4a9a5ed8808ef4d9e9f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2466,11 +2466,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -2465,11 +2465,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else { } else {
// CraftBukkit start - Capture drops for death event // CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) { if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@ -34,7 +34,7 @@ index ee55a63edd38c9919d4dfdc8434ba80f697ba0c0..be9b96f6b725c53aec5c67c8387305d5
entityitem.setDefaultPickUpDelay(); entityitem.setDefaultPickUpDelay();
// CraftBukkit start // CraftBukkit start
@@ -3270,6 +3271,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -3269,6 +3270,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable @Nullable
public Entity teleportTo(ServerLevel worldserver, Vec3 location) { public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
// CraftBukkit end // CraftBukkit end
@ -47,7 +47,7 @@ index ee55a63edd38c9919d4dfdc8434ba80f697ba0c0..be9b96f6b725c53aec5c67c8387305d5
if (this.level() instanceof ServerLevel && !this.isRemoved()) { if (this.level() instanceof ServerLevel && !this.isRemoved()) {
this.level().getProfiler().push("changeDimension"); this.level().getProfiler().push("changeDimension");
// CraftBukkit start // CraftBukkit start
@@ -3296,6 +3303,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -3295,6 +3302,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit end // CraftBukkit end
this.level().getProfiler().popPush("reloading"); this.level().getProfiler().popPush("reloading");
@ -59,7 +59,7 @@ index ee55a63edd38c9919d4dfdc8434ba80f697ba0c0..be9b96f6b725c53aec5c67c8387305d5
Entity entity = this.getType().create(worldserver); Entity entity = this.getType().create(worldserver);
if (entity != null) { if (entity != null) {
@@ -3313,10 +3325,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -3312,10 +3324,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start - Forward the CraftEntity to the new entity // CraftBukkit start - Forward the CraftEntity to the new entity
this.getBukkitEntity().setHandle(entity); this.getBukkitEntity().setHandle(entity);
entity.bukkitEntity = this.getBukkitEntity(); entity.bukkitEntity = this.getBukkitEntity();
@ -70,7 +70,7 @@ index ee55a63edd38c9919d4dfdc8434ba80f697ba0c0..be9b96f6b725c53aec5c67c8387305d5
// CraftBukkit end // CraftBukkit end
} }
@@ -3435,7 +3443,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -3434,7 +3442,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
public boolean canChangeDimensions() { public boolean canChangeDimensions() {
@ -80,7 +80,7 @@ index ee55a63edd38c9919d4dfdc8434ba80f697ba0c0..be9b96f6b725c53aec5c67c8387305d5
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 69f7cdb2c507ba45dc4a689d4f33c059a57907a1..4605978cad9cbaa8b55b12c26476f85471658c82 100644 index e309d74047b039e595cb59396710f68490a2249a..6114cc60d8cb122b708ae65db86bfd1ea2ea82c1 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1705,9 +1705,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -1705,9 +1705,9 @@ public abstract class LivingEntity extends Entity implements Attackable {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a191254fa3bd8cdf2cb5446c88c71ed0be6761e8..ebf436e8160c0a6ff064c2b279a47b272e3acb05 100644 index f3abc5552d058c5b96ed56fc49ffd9f420668d01..a1da534dab13f475dca626645c246ef36aea6938 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -867,7 +867,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -867,7 +867,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b501ed140902a0143553f338871e3b8b71a7f71e..363d251c80b7d8585425cab456822fd6cde67f23 100644 index f88426ce7f1b4ebc65a39c19900e75de22c5903b..28fe0834c6287181cc21b9ceedc2dd1074db984e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -577,6 +577,13 @@ public final class CraftServer implements Server { @@ -577,6 +577,13 @@ public final class CraftServer implements Server {

View file

@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this. Set system properly at server startup if not set already to help protect from this.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 78e007b15699fc83a3fcc2e2767209387444f0e5..68b849321757493c64e874b5a2c5d5357a52d698 100644 index 5030b865c84d84ed5be9f4987a7f0a829b8ea1e5..b4975e80c1929826feb880526b41b2c871ac8c8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -26,6 +26,7 @@ public class Main { @@ -26,6 +26,7 @@ public class Main {

View file

@ -29,7 +29,7 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
index 867f22bdeed5f1c3f063a5815a3477d143057152..5c4a89fc7388b8e6ca9ade03fd34a8da79ae0ad9 100644 index 40ff3090fb17fb0f01a9b52639fb783ea57ce6b6..d39743d9626eb01c942194387dafb1106f13601b 100644
--- a/src/main/java/net/minecraft/commands/Commands.java --- a/src/main/java/net/minecraft/commands/Commands.java
+++ b/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java
@@ -341,7 +341,7 @@ public class Commands { @@ -341,7 +341,7 @@ public class Commands {
@ -42,26 +42,26 @@ index 867f22bdeed5f1c3f063a5815a3477d143057152..5c4a89fc7388b8e6ca9ade03fd34a8da
StackTraceElement[] astacktraceelement = exception.getStackTrace(); StackTraceElement[] astacktraceelement = exception.getStackTrace();
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 570c163e4a56206d1cf259ee1ffcb6f865f72b1c..1963cf2716879c6d193cbed8de9538094dda9b3d 100644 index 831998b12c296d5731ae09d4abb5548201226c77..0b79a72b8b2325416cd1a5743a27787e93ffa644 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -918,6 +918,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -914,6 +914,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start // CraftBukkit start
private boolean hasStopped = false; private boolean hasStopped = false;
public volatile boolean hasFullyShutdown = false; // Paper
+ private boolean hasLoggedStop = false; // Paper - Debugging + private boolean hasLoggedStop = false; // Paper - Debugging
private final Object stopLock = new Object(); private final Object stopLock = new Object();
public final boolean hasStopped() { public final boolean hasStopped() {
synchronized (this.stopLock) { synchronized (this.stopLock) {
@@ -932,6 +933,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -928,6 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.hasStopped) return; if (this.hasStopped) return;
this.hasStopped = true; this.hasStopped = true;
} }
+ if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging + if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
// Paper start - kill main thread, and kill it hard // CraftBukkit end
shutdownThread = Thread.currentThread(); if (this.metricsRecorder.isRecording()) {
org.spigotmc.WatchdogThread.doStop(); // Paper this.cancelRecordingMetrics();
@@ -1032,6 +1034,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1002,6 +1004,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) { public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
this.isRestarting = isRestarting; this.isRestarting = isRestarting;
@ -87,7 +87,7 @@ index 04a728a16bb629adbae1cd8586764a6dbc22b5dc..d130f843975236018df4fa2ccc3ca6aa
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 363d251c80b7d8585425cab456822fd6cde67f23..2333858596a76ff8dddb014f31ad2a3d7e926baf 100644 index 28fe0834c6287181cc21b9ceedc2dd1074db984e..42548bcd1a890e713c4b5103f36a5a9facc703d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1006,6 +1006,7 @@ public final class CraftServer implements Server { @@ -1006,6 +1006,7 @@ public final class CraftServer implements Server {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Prevent teleporting dead entities
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ebf436e8160c0a6ff064c2b279a47b272e3acb05..4d5fc9123e13ad764a88c40f1be1205b6f6f102e 100644 index a1da534dab13f475dca626645c246ef36aea6938..11f50899ee0144fc56e6829850ad37dd8e6349eb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1545,6 +1545,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1545,6 +1545,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -471,7 +471,7 @@ index 2d5494d2813b773e60ddba6790b750a9a08f21f8..0b210bdf7c1f5962afbd44195af6f84f
} }
} }
diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java diff --git a/src/main/java/net/minecraft/CrashReport.java b/src/main/java/net/minecraft/CrashReport.java
index 059b1a0bf048af6a28c322f35da3d3cbbe426546..e047dee632022abfe05865d1e71838be8d5d053a 100644 index a9a0248b1bd1ac454064e977b61f9b7d80962ff8..6f2452de76e8f5fcc1367066e0e753740764eb98 100644
--- a/src/main/java/net/minecraft/CrashReport.java --- a/src/main/java/net/minecraft/CrashReport.java
+++ b/src/main/java/net/minecraft/CrashReport.java +++ b/src/main/java/net/minecraft/CrashReport.java
@@ -34,6 +34,7 @@ public class CrashReport { @@ -34,6 +34,7 @@ public class CrashReport {
@ -495,7 +495,7 @@ index 52eb3176437113f9a0ff85d10ce5c2415e1b5570..b54ddd0ba0b001fbcb1838a838ca4890
} }
} }
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index c66fc75fb88c4f0a4273d69009a4e6defb0b29e9..b99dbe3878df8f67a6920195088c00a01289a79f 100644 index 128debf837da32d27ba37184162e7b3bfb463812..6cfb814ecaf12161ec2e2545560453d7dd41e2da 100644
--- a/src/main/java/net/minecraft/network/Connection.java --- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java
@@ -75,13 +75,13 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> { @@ -75,13 +75,13 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
@ -545,7 +545,7 @@ index 61f05f34ca33837c643f2915e753ec3935a38314..85b8be8ffac0fb40e9cae0528271ed41
throw new SkipPacketException(var13); throw new SkipPacketException(var13);
} }
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 0e2978b6e4f03932c4ebdf1309d20454b9130132..ab84c4b098184370c8b63cbae687116a7b077cf5 100644 index 3779e02083fb41e93248aed27a9214be88167e5a..1d8f8b1910f50e90d60bb2a924d49f3fd3518fd6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -194,6 +194,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -194,6 +194,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -570,7 +570,7 @@ index d130f843975236018df4fa2ccc3ca6aaca7a06b8..76f31845fe50200d09e5ab6a6c08da00
// Paper end - Debugging // Paper end - Debugging
this.connection.send(new ClientboundDisconnectPacket(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA)); this.connection.send(new ClientboundDisconnectPacket(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA));
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index caeead6c6082855f1651ee28263cc9f60423ca0c..b2bfb3893200362ac35ae60982f203f86a1148ec 100644 index 9db7fc8c053aa9e929fa6dddf70290a8f7ad5273..dfa07c9ede9d748a05ee47826bdbcf7390ec8219 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
@@ -52,10 +52,10 @@ public class ServerConnectionListener { @@ -52,10 +52,10 @@ public class ServerConnectionListener {
@ -609,7 +609,7 @@ index 14bd0b94ece3f826f822b4900c7250ebdc27d937..59eb65e207ff0206b0dfad6f2dcffe78
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java 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 4891073602609fc2709715460e0675a7cc2a4cdd..d85ed706703e50f76df8db414827ccd41a5985d9 100644 index 796aa86e12cf9062b3467a3678c895af5ad626fe..9e01a22df54492d9c8e9f9defd84014dc109514b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -599,7 +599,7 @@ public class LevelChunk extends ChunkAccess { @@ -599,7 +599,7 @@ public class LevelChunk extends ChunkAccess {
@ -638,10 +638,10 @@ index 3c1992e212a6d6f1db4d5b807b38d71913619fc0..9c1aff17aabd062640e3f451a2ef8c50
CraftAsyncScheduler() { CraftAsyncScheduler() {
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 5ca863aa1859922fa359eba32539229db40e5b98..dca163ff5436f1007383c8261cac1ac7c0613f23 100644 index 230d55820778e84c1c8aa2b013ae0e5e35568ea1..a15749bcfb2b36a31801cb1a26b7181ce304e0ee 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java --- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -105,7 +105,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -102,7 +102,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
log.log( Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity" ); log.log( Level.SEVERE, "During the run of the server, a plugin set an excessive velocity on an entity" );
log.log( Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated" ); log.log( Level.SEVERE, "This may be the cause of the issue, or it may be entirely unrelated" );
log.log( Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage()); log.log( Level.SEVERE, org.bukkit.craftbukkit.CraftServer.excessiveVelEx.getMessage());
@ -650,7 +650,7 @@ index 5ca863aa1859922fa359eba32539229db40e5b98..dca163ff5436f1007383c8261cac1ac7
{ {
log.log( Level.SEVERE, "\t\t" + stack ); log.log( Level.SEVERE, "\t\t" + stack );
} }
@@ -192,7 +192,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa @@ -174,7 +174,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
} }
log.log( Level.SEVERE, "\tStack:" ); log.log( Level.SEVERE, "\tStack:" );
// //
@ -660,7 +660,7 @@ index 5ca863aa1859922fa359eba32539229db40e5b98..dca163ff5436f1007383c8261cac1ac7
log.log( Level.SEVERE, "\t\t" + stack ); log.log( Level.SEVERE, "\t\t" + stack );
} }
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
index 266b4e6fb3988b5848021c83fdc68e342c70b188..2b247d55e39246fbef31279b14c45fc40f956bfb 100644 index ea4e2161c0bd43884055cc6b8d70b2139f70e720..4e2ca9162450c1f54b7ab95a63c1bad8efe81a06 100644
--- a/src/main/resources/log4j2.xml --- a/src/main/resources/log4j2.xml
+++ b/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml
@@ -30,10 +30,14 @@ @@ -30,10 +30,14 @@

View file

@ -744,41 +744,15 @@ index 0000000000000000000000000000000000000000..0d30e0b21b9024df939a9d070bd4a99b
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java
index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..b0ee4fbd4a52e30a9dff4179aa0fbf62ee1767ad 100644 index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7ed66736b 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java --- a/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/Goal.java
@@ -7,6 +7,14 @@ public abstract class Goal { @@ -51,7 +51,19 @@ public abstract class Goal {
private final EnumSet<Goal.Flag> flags = EnumSet.noneOf(Goal.Flag.class); // Paper unused, but dummy to prevent plugins from crashing as hard. Theyll need to support paper in a special case if this is super important, but really doesn't seem like it would be.
private final com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<net.minecraft.world.entity.ai.goal.Goal.Flag> goalTypes = new com.destroystokyo.paper.util.set.OptimizedSmallEnumSet<>(Goal.Flag.class); // Paper - remove streams from pathfindergoalselector
+ // Paper start - Mob goal API; make sure goaltypes is never empty
+ public Goal() {
+ if (this.goalTypes.size() == 0) {
+ this.goalTypes.addUnchecked(Flag.UNKNOWN_BEHAVIOR);
+ }
+ }
+ // Paper end - Mob goal API
+
public abstract boolean canUse();
public boolean canContinueToUse() {
@@ -34,6 +42,10 @@ public abstract class Goal {
// Paper start - remove streams from pathfindergoalselector
this.goalTypes.clear();
this.goalTypes.addAllUnchecked(controls);
+ // make sure its never empty
+ if (this.goalTypes.size() == 0) {
+ this.goalTypes.addUnchecked(Flag.UNKNOWN_BEHAVIOR);
+ }
// Paper end - remove streams from pathfindergoalselector
}
@@ -56,7 +68,19 @@ public abstract class Goal {
return Mth.positiveCeilDiv(serverTicks, 2); return Mth.positiveCeilDiv(serverTicks, 2);
} }
+ // Paper start - Mob goal api + // Paper start - Mob goal api
+ private com.destroystokyo.paper.entity.ai.PaperVanillaGoal<?> vanillaGoal = null; + private com.destroystokyo.paper.entity.ai.PaperVanillaGoal<?> vanillaGoal;
+ public <T extends org.bukkit.entity.Mob> com.destroystokyo.paper.entity.ai.Goal<T> asPaperVanillaGoal() { + public <T extends org.bukkit.entity.Mob> com.destroystokyo.paper.entity.ai.Goal<T> asPaperVanillaGoal() {
+ if(this.vanillaGoal == null) { + if(this.vanillaGoal == null) {
+ this.vanillaGoal = new com.destroystokyo.paper.entity.ai.PaperVanillaGoal<>(this); + this.vanillaGoal = new com.destroystokyo.paper.entity.ai.PaperVanillaGoal<>(this);
@ -794,7 +768,7 @@ index 4379b9948f1eecfe6fd7dea98e298ad5f761019a..b0ee4fbd4a52e30a9dff4179aa0fbf62
LOOK, LOOK,
JUMP, JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 2333858596a76ff8dddb014f31ad2a3d7e926baf..6fd94e54abe92b1a081591a64af8da09b9303d08 100644 index 42548bcd1a890e713c4b5103f36a5a9facc703d0..8997f35d4e3d66f4ac2e1b774e7869771d938dde 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2881,5 +2881,11 @@ public final class CraftServer implements Server { @@ -2881,5 +2881,11 @@ public final class CraftServer implements Server {

View file

@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
if any are still running after that delay just as reload does. if any are still running after that delay just as reload does.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 1963cf2716879c6d193cbed8de9538094dda9b3d..9829f86520c4028a94f239fb4804fb0f2a2ac6fa 100644 index 0b79a72b8b2325416cd1a5743a27787e93ffa644..87966edd7fb8b936c55659257291478c862e2542 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -958,6 +958,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -941,6 +941,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// CraftBukkit start // CraftBukkit start
if (this.server != null) { if (this.server != null) {
this.server.disablePlugins(); this.server.disablePlugins();
@ -22,7 +22,7 @@ index 1963cf2716879c6d193cbed8de9538094dda9b3d..9829f86520c4028a94f239fb4804fb0f
// CraftBukkit end // CraftBukkit end
this.getConnection().stop(); this.getConnection().stop();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 6fd94e54abe92b1a081591a64af8da09b9303d08..c2cafdacde4edef8674b96fd8614a47b6af4b64b 100644 index 8997f35d4e3d66f4ac2e1b774e7869771d938dde..ad390e137aa1492a4aa807f7cc315fb0cac46e62 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1016,6 +1016,31 @@ public final class CraftServer implements Server { @@ -1016,6 +1016,31 @@ public final class CraftServer implements Server {

View file

@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840
This patch also fixes rail duping and carpet duping. This patch also fixes rail duping and carpet duping.
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
index e4a3c937950b26e81b89d6ddcf3d6c2794ed934d..c34b34a6be594c502d1cb59703ace8ad8dd96915 100644 index b3732a6246a2b011e36c5c35fa2ac7749e75db16..3ae61e7b50bfc440c597f88843f92903f8a66801 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
@@ -426,14 +426,26 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -413,14 +413,26 @@ public class PistonBaseBlock extends DirectionalBlock {
} }
for (j = list.size() - 1; j >= 0; --j) { for (j = list.size() - 1; j >= 0; --j) {

View file

@ -7,7 +7,7 @@ If the falling block dies during teleportation (entity#move), then we need
to detect that by placing a check after the move. to detect that by placing a check after the move.
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 9be45ff8139c9d385c1deb1200e3718ed3add801..fc33d05cf1a3cceb220dab1ee1da33ffe37834db 100644 index ffed5f2295f60416535015a28635975aa2d211dd..bfd8304f4fc2aded1681c7a59cf9d81192e5a3b2 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity { @@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity {

View file

@ -13,7 +13,7 @@ behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method. of the move call and into an appropriate place in the tick method.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4d5fc9123e13ad764a88c40f1be1205b6f6f102e..802602882a76fbb026c524225f74bb3780d219c0 100644 index 11f50899ee0144fc56e6829850ad37dd8e6349eb..709eb006717da012ce5f0d3dba9e5bee1e277a90 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1366,6 +1366,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1366,6 +1366,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 802602882a76fbb026c524225f74bb3780d219c0..d244a20961e5e3e459bf2bc784014b3f963590ea 100644 index 709eb006717da012ce5f0d3dba9e5bee1e277a90..99bcaf518e22b8d3cd79068defe776bb792abe6c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2973,16 +2973,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2973,16 +2973,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Add permission for command blocks
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 3629f164f05cc2d33c76bb21cfe4598539aa08e0..5b951937511126d58665c5e2baf18186a7a8d325 100644 index 99784bac05ea0d2ea1e9053466e21c1175fe0a4b..9f3450d6bbd330a2aebd271a086965bf364c9fe4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -399,7 +399,7 @@ public class ServerPlayerGameMode { @@ -399,7 +399,7 @@ public class ServerPlayerGameMode {
@ -18,7 +18,7 @@ index 3629f164f05cc2d33c76bb21cfe4598539aa08e0..5b951937511126d58665c5e2baf18186
return false; return false;
} else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index d244a20961e5e3e459bf2bc784014b3f963590ea..56a664d7810e4c4b0f85d714e2b89014bb460fac 100644 index 99bcaf518e22b8d3cd79068defe776bb792abe6c..2502b8145da151a63dc769c4e717d53d651203c3 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -778,7 +778,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -778,7 +778,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Ensure Entity position and AABB are never invalid
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com> Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index f51453bd3018667aa491c9b64b6f9c4d5c703d7a..e68a29eb0c81285039a1a980d8b9b83f0b1d022e 100644 index d0f46b955041487ce1cec4a9a5ed8808ef4d9e9f..7040b3b9b743b4f88f00da698e37afa42f277990 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -727,8 +727,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -693,8 +693,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
public void setPos(double x, double y, double z) { public void setPos(double x, double y, double z) {
@ -20,7 +20,7 @@ index f51453bd3018667aa491c9b64b6f9c4d5c703d7a..e68a29eb0c81285039a1a980d8b9b83f
} }
protected AABB makeBoundingBox() { protected AABB makeBoundingBox() {
@@ -4240,7 +4240,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -4206,7 +4206,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale); return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
} }
@ -50,7 +50,7 @@ index f51453bd3018667aa491c9b64b6f9c4d5c703d7a..e68a29eb0c81285039a1a980d8b9b83f
// Paper start - rewrite chunk system // Paper start - rewrite chunk system
if (this.updatingSectionStatus) { if (this.updatingSectionStatus) {
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable()); LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
@@ -4264,6 +4286,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -4230,6 +4252,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.levelCallback.onMove(); this.levelCallback.onMove();
} }

View file

@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load. of restoring the server.properties every single load.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9829f86520c4028a94f239fb4804fb0f2a2ac6fa..229f5c1d651d903e1c641e67661004a4ee010417 100644 index 87966edd7fb8b936c55659257291478c862e2542..74ce2fc0256c1747bb1638eea8947d3416f23ab8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -828,7 +828,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -825,7 +825,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper - Configurable Keep Spawn Loaded range per world if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper - Configurable Keep Spawn Loaded range per world
// CraftBukkit start // CraftBukkit start
// this.updateMobSpawningFlags(); // this.updateMobSpawningFlags();
@ -20,7 +20,7 @@ index 9829f86520c4028a94f239fb4804fb0f2a2ac6fa..229f5c1d651d903e1c641e67661004a4
this.forceTicks = false; this.forceTicks = false;
// CraftBukkit end // CraftBukkit end
@@ -1814,11 +1814,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1759,11 +1759,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
} }
@ -40,7 +40,7 @@ index 9829f86520c4028a94f239fb4804fb0f2a2ac6fa..229f5c1d651d903e1c641e67661004a4
} }
} }
@@ -1832,7 +1835,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1777,7 +1780,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) { while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next(); ServerLevel worldserver = (ServerLevel) iterator.next();
@ -63,7 +63,7 @@ index 997a96a21440ae72696d68f8031ece4ba487d3ef..3d8584929cee000ae7df10c5bd94f358
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName()); return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
}, true); }, true);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index ab84c4b098184370c8b63cbae687116a7b077cf5..09956f69b63844d67aeab1339ae65910fc8eb8bf 100644 index 1d8f8b1910f50e90d60bb2a924d49f3fd3518fd6..b6f87e28625df68548a296001a0d67601513f7d1 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -325,7 +325,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -325,7 +325,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -76,7 +76,7 @@ index ab84c4b098184370c8b63cbae687116a7b077cf5..09956f69b63844d67aeab1339ae65910
@Override @Override
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c87e5dd12b5931f9d06bd70a3dd591882a5c1f17..241c16b8df5128f2c88ed2f9e9c51d7f7b8420b4 100644 index b5dcb539548ca35d7c8a076d474a5c679a61c071..6020da902ef3c05d38116c302e3848aa1828e1fa 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1209,7 +1209,7 @@ public class ServerPlayer extends Player { @@ -1209,7 +1209,7 @@ public class ServerPlayer extends Player {
@ -89,7 +89,7 @@ index c87e5dd12b5931f9d06bd70a3dd591882a5c1f17..241c16b8df5128f2c88ed2f9e9c51d7f
playerlist.sendPlayerPermissionLevel(this); playerlist.sendPlayerPermissionLevel(this);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 56a664d7810e4c4b0f85d714e2b89014bb460fac..75073ab08a90bd0ce8afc54634e7d61d50650742 100644 index 2502b8145da151a63dc769c4e717d53d651203c3..2f8715e200b9b8ae4c4b70ddd7cdc3368a109939 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3176,7 +3176,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -3176,7 +3176,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -102,7 +102,7 @@ index 56a664d7810e4c4b0f85d714e2b89014bb460fac..75073ab08a90bd0ce8afc54634e7d61d
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c2cafdacde4edef8674b96fd8614a47b6af4b64b..71da3ebf372b63119fadbe2412aa02dce61086b4 100644 index ad390e137aa1492a4aa807f7cc315fb0cac46e62..c5bb505112f7d8207f4a62cc00111cce2cb09cf0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -955,8 +955,8 @@ public final class CraftServer implements Server { @@ -955,8 +955,8 @@ public final class CraftServer implements Server {
@ -117,7 +117,7 @@ index c2cafdacde4edef8674b96fd8614a47b6af4b64b..71da3ebf372b63119fadbe2412aa02dc
for (SpawnCategory spawnCategory : SpawnCategory.values()) { for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) { if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 9896ea05523f6fb75213c861c9cf3962976cce88..85bc6dbfe71d841b4ed1ed912d3fe19d994a17f0 100644 index 40c9f9a0e1a2b126160428124b3430b56f5a0b83..d5b308cab976c5a4004683592882aa09fe72e345 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1158,7 +1158,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -1158,7 +1158,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View file

@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 71da3ebf372b63119fadbe2412aa02dce61086b4..a25cc6f7d91100b98996d9f07fff3c62018ddf86 100644 index c5bb505112f7d8207f4a62cc00111cce2cb09cf0..6dde3d479aa1ae50c6404419ec5da52f0b68a11e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -377,7 +377,7 @@ public final class CraftServer implements Server { @@ -377,7 +377,7 @@ public final class CraftServer implements Server {
@ -44,7 +44,7 @@ index 71da3ebf372b63119fadbe2412aa02dce61086b4..a25cc6f7d91100b98996d9f07fff3c62
this.printSaveWarning = false; this.printSaveWarning = false;
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 85bc6dbfe71d841b4ed1ed912d3fe19d994a17f0..2d6ef62205ff5a4da72e718f9b33d955a58d805f 100644 index d5b308cab976c5a4004683592882aa09fe72e345..b91205b8459cfc78fce4b98e04ae4517eef22e20 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -282,7 +282,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View file

@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 229f5c1d651d903e1c641e67661004a4ee010417..08e3f07c4547f8fa7b571ecef7436ba1fbee578a 100644 index 74ce2fc0256c1747bb1638eea8947d3416f23ab8..efb5a5b31ada326593b3bea0f49c05591db18801 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -901,7 +901,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -898,7 +898,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
try { try {
this.isSaving = true; this.isSaving = true;
@ -17,7 +17,7 @@ index 229f5c1d651d903e1c641e67661004a4ee010417..08e3f07c4547f8fa7b571ecef7436ba1
flag3 = this.saveAllChunks(suppressLogs, flush, force); flag3 = this.saveAllChunks(suppressLogs, flush, force);
} finally { } finally {
this.isSaving = false; this.isSaving = false;
@@ -1427,16 +1427,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1372,16 +1372,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
--this.ticksUntilAutosave; --this.ticksUntilAutosave;
@ -34,7 +34,7 @@ index 229f5c1d651d903e1c641e67661004a4ee010417..08e3f07c4547f8fa7b571ecef7436ba1
+ int playerSaveInterval = io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.rate; + int playerSaveInterval = io.papermc.paper.configuration.GlobalConfiguration.get().playerAutoSave.rate;
+ if (playerSaveInterval < 0) { + if (playerSaveInterval < 0) {
+ playerSaveInterval = autosavePeriod; + playerSaveInterval = autosavePeriod;
+ } }
+ this.profiler.push("save"); + this.profiler.push("save");
+ final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0; + final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
+ try { + try {
@ -49,14 +49,14 @@ index 229f5c1d651d903e1c641e67661004a4ee010417..08e3f07c4547f8fa7b571ecef7436ba1
+ } + }
+ } finally { + } finally {
+ this.isSaving = false; + this.isSaving = false;
} + }
+ this.profiler.pop(); + this.profiler.pop();
+ // Paper end - Incremental chunk and player saving + // Paper end - Incremental chunk and player saving
io.papermc.paper.util.CachedLists.reset(); // Paper io.papermc.paper.util.CachedLists.reset(); // Paper
// Paper start - move executeAll() into full server tick timing // Paper start - move executeAll() into full server tick timing
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) { try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 56fe3f4edd15239533a1ae9287e86528b3296bdc..a35957eef3f6ab2dcfebc01eaa9bea1b249599e2 100644 index a2220291f6d0726019187c2fc93bca801a3f0610..25009accd401fc3860c57cac1ef628b233e746e7 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -450,6 +450,15 @@ public class ServerChunkCache extends ChunkSource { @@ -450,6 +450,15 @@ public class ServerChunkCache extends ChunkSource {
@ -76,7 +76,7 @@ index 56fe3f4edd15239533a1ae9287e86528b3296bdc..a35957eef3f6ab2dcfebc01eaa9bea1b
public void close() throws IOException { public void close() throws IOException {
// CraftBukkit start // CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 1b92cee2f51b844340d213ccfc78d1524a71c9dc..d9d4a8df764bce67ee13a542e0b21a5ec7fd8ca7 100644 index 6a1e893d4ec1e5fe598422807f1717b19579fe2e..cdd766ccf85df7d0c17d36c544a5346dc46b4f22 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1301,6 +1301,37 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1301,6 +1301,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -118,7 +118,7 @@ index 1b92cee2f51b844340d213ccfc78d1524a71c9dc..d9d4a8df764bce67ee13a542e0b21a5e
// Paper start - rewrite chunk system - add close param // Paper start - rewrite chunk system - add close param
this.save(progressListener, flush, savingDisabled, false); this.save(progressListener, flush, savingDisabled, false);
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 241c16b8df5128f2c88ed2f9e9c51d7f7b8420b4..9b3425857342f4c75ae23aee922d792977aa8c4e 100644 index 6020da902ef3c05d38116c302e3848aa1828e1fa..553cdac6fef1626d0eac86ca971fcf65a17839f8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -190,6 +190,7 @@ import org.bukkit.inventory.MainHand; @@ -190,6 +190,7 @@ import org.bukkit.inventory.MainHand;
@ -130,7 +130,7 @@ index 241c16b8df5128f2c88ed2f9e9c51d7f7b8420b4..9b3425857342f4c75ae23aee922d7929
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10; private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
private static final int FLY_STAT_RECORDING_SPEED = 25; private static final int FLY_STAT_RECORDING_SPEED = 25;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 805759ae7d92f690cea4c700c914769d39e3c0b6..ca0e6c8e27f998a078e6f60a3cad67ddda7706c7 100644 index 7750c1980ea7e211a35ad077b95ab0e206900e17..8c32e68e82a1c87a473b2ea50afeeb0043b0e8fa 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -552,6 +552,7 @@ public abstract class PlayerList { @@ -552,6 +552,7 @@ public abstract class PlayerList {
@ -141,7 +141,7 @@ index 805759ae7d92f690cea4c700c914769d39e3c0b6..ca0e6c8e27f998a078e6f60a3cad67dd
this.playerIo.save(player); this.playerIo.save(player);
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
@@ -1153,10 +1154,22 @@ public abstract class PlayerList { @@ -1152,10 +1153,22 @@ public abstract class PlayerList {
} }
public void saveAll() { public void saveAll() {

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4605978cad9cbaa8b55b12c26476f85471658c82..be239cce5b4d326da46bcf63394d1bc03f2a9bb6 100644 index 6114cc60d8cb122b708ae65db86bfd1ea2ea82c1..b691d188c741c8acf8d20bc9e6184b6445ba6332 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3510,7 +3510,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -3510,7 +3510,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

View file

@ -26,7 +26,7 @@ index d8142624f9f3a5909e7cc5665f1629a1a67dd302..b02fb15c98ab873fa78635d7a23706dd
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
index 8e0ea79a41136b697f5e58b5cd71f6a9bc3cab73..de7d11baf17d1b6c3d5fb3402d38052f3a28c246 100644 index 0f98345f8adc6e9bf7fb2dc9ce4eba59a33ded61..907bc9d84dbc98427384cf529bfde4b09d8ce8ca 100644
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
@@ -64,7 +64,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS @@ -64,7 +64,7 @@ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceS

View file

@ -10,7 +10,7 @@ This fixes that by checking if the modified spawn location is
still at a respawn anchor. 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 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index ca0e6c8e27f998a078e6f60a3cad67ddda7706c7..f68691542e57da7866253c43251c10235ebc57a0 100644 index 8c32e68e82a1c87a473b2ea50afeeb0043b0e8fa..d5890b41c2ddf955416a64132f3022d95850f04b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -806,6 +806,7 @@ public abstract class PlayerList { @@ -806,6 +806,7 @@ public abstract class PlayerList {
@ -44,7 +44,7 @@ index ca0e6c8e27f998a078e6f60a3cad67ddda7706c7..f68691542e57da7866253c43251c1023
if (!flag) entityplayer.reset(); // SPIGOT-4785 if (!flag) entityplayer.reset(); // SPIGOT-4785
isRespawn = true; // Paper - Add PlayerPostRespawnEvent isRespawn = true; // Paper - Add PlayerPostRespawnEvent
} else { } else {
@@ -899,8 +905,14 @@ public abstract class PlayerList { @@ -898,8 +904,14 @@ public abstract class PlayerList {
} }
// entityplayer1.initInventoryMenu(); // entityplayer1.initInventoryMenu();
entityplayer1.setHealth(entityplayer1.getHealth()); entityplayer1.setHealth(entityplayer1.getHealth());

View file

@ -55,7 +55,7 @@ index 5450734060428426981e2c1f1025b1aa5aa4d271..805459ba815520165c86a537fbb1f3e0
LootContext lootContext = EntityPredicate.createContext(player, player); LootContext lootContext = EntityPredicate.createContext(player, player);
List<CriterionTrigger.Listener<T>> list = null; List<CriterionTrigger.Listener<T>> list = null;
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
index f6daa77856f5d57b1a3b38e709bff47214372973..f29ddc244cfa5eba9b2903d40d8509731fc18287 100644 index c61789a2df774761feb79123d31eab75f9996bf2..6e0073a54f59621d8adb4e8a70e6c89c708eabba 100644
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
@@ -63,6 +63,7 @@ public class PlayerAdvancements { @@ -63,6 +63,7 @@ public class PlayerAdvancements {

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 diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index dc0869c5f4e4fcae9d4fed41a33bc9a278da6d22..1d19688f9861f6a44ed6ff181befd1f7b5cc6947 100644 index 553cdac6fef1626d0eac86ca971fcf65a17839f8..2834161f763a556400f0c8acdcc7e88c4317d318 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -278,6 +278,7 @@ public class ServerPlayer extends Player { @@ -278,6 +278,7 @@ public class ServerPlayer extends Player {
@ -17,7 +17,7 @@ index dc0869c5f4e4fcae9d4fed41a33bc9a278da6d22..1d19688f9861f6a44ed6ff181befd1f7
// Paper start - replace player chunk loader // 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)); 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));
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 1b53b0ee686f34a881840c549c66ea1cbab36c9f..5e86123f41e63fbf3d37d0351c04a8c73da60f63 100644 index e69043316372d98b122ed3788fda79cdd36849e8..6597e6e9987ddb5906909c22704fdfb6557aee8e 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -55,6 +55,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -55,6 +55,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack

View file

@ -5,7 +5,7 @@ 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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index d9d4a8df764bce67ee13a542e0b21a5ec7fd8ca7..489db5b6cf82c518806dbabc43ec18fca7e672c4 100644 index cdd766ccf85df7d0c17d36c544a5346dc46b4f22..5089fe44bdd1d20b6b54ef26e8107c5c75ff3ea2 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2014,9 +2014,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2014,9 +2014,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -21,7 +21,7 @@ index d9d4a8df764bce67ee13a542e0b21a5ec7fd8ca7..489db5b6cf82c518806dbabc43ec18fc
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add // if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn); 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 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2d6ef62205ff5a4da72e718f9b33d955a58d805f..bbae63fb0a5f3f61c25f8348b72b1f20dcece00a 100644 index b91205b8459cfc78fce4b98e04ae4517eef22e20..705c1b2bba2b60b260c59a6953151f34cdfc8960 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/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 { @@ -262,12 +262,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View file

@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created
Prevent headless pistons from being created by explosions or tree/mushroom growth. 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 diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
index cf81854facadaf3c1f860bcaaf69db463a31b0c9..299583b1eb72cfdb4771ba0755fd71f2135484c1 100644 index b1fdfae75aeea78ca77987e40242bf498447bc08..5097d9f1a3ab4e49e1899ede1742436357b0ad91 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java --- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -206,6 +206,15 @@ public class Explosion { @@ -205,6 +205,15 @@ public class Explosion {
if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) { if (f > 0.0F && this.damageCalculator.shouldBlockExplode(this, this.level, blockposition, iblockdata, f)) {
set.add(blockposition); set.add(blockposition);

View file

@ -7,7 +7,7 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a
village bell. Passes along the bell block and the player who rang it. village bell. Passes along the bell block and the player who rang it.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index d147f545e80695fc30b458da640f66c7ab809cce..d51af2830fd347d5e55f5fa788df0e5b8481248c 100644 index 8ac093866aec59b4e031b953d4c3c3af66733812..915f49bbfca87682a3ae497dfcd335268f974efe 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -366,10 +366,11 @@ public class CraftEventFactory { @@ -366,10 +366,11 @@ public class CraftEventFactory {

View file

@ -8,7 +8,7 @@ the world per tick, this attempts to reduce the impact that join floods
has on the server has on the server
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
index b99dbe3878df8f67a6920195088c00a01289a79f..19df0fa85080897a36bdbffa8fcef0991dbdd191 100644 index 6cfb814ecaf12161ec2e2545560453d7dd41e2da..a25090d277f586c932e975068636ccd6cc43b204 100644
--- a/src/main/java/net/minecraft/network/Connection.java --- a/src/main/java/net/minecraft/network/Connection.java
+++ b/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java
@@ -498,14 +498,29 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> { @@ -498,14 +498,29 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {

View file

@ -29,7 +29,7 @@ index 21aafb1ea51769659462d722aa318460b37cbc1c..228359f13511262a0e4afeb9deff982c
this.connection.disconnect(ichatmutablecomponent); this.connection.disconnect(ichatmutablecomponent);
} else { } else {
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index e9d94abb77693a845ea6318b7045bd61a7a46feb..e2c7fa3fd05ebb3b76388410d26b6493baf4f877 100644 index ba0bdd685c49c02bcb1b6d840ddceb9049565d34..d4658328eeecb1c9e3e25eec14dea07e9e2a8b74 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -99,7 +99,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @@ -99,7 +99,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,

View file

@ -79,7 +79,7 @@ index 5e5d0e5b41b5ed90a5f0109b231d468bbc566ae7..b1e9ea9ece5ef8ecbe2ed919fda8e115
private static int getFireTickDelay(RandomSource random) { private static int getFireTickDelay(RandomSource random) {
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 2d1062d2b0412180cc08765ecf9b0a071983c06a..d1d00b9a078ee1f5a6c5dd51c2f0409d12c85c26 100644 index 7e4264f87a0f81db71d49dbede32a1bad87f7ca8..aa15d65f69f89da97cecd47c3458cd3b4937055f 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
@@ -43,6 +43,7 @@ import net.minecraft.world.item.DyeColor; @@ -43,6 +43,7 @@ import net.minecraft.world.item.DyeColor;

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 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 08e3f07c4547f8fa7b571ecef7436ba1fbee578a..2600be3ec00a1ba8cff5f03c8e3f7a06a05bbeaf 100644 index efb5a5b31ada326593b3bea0f49c05591db18801..903d43aaa84fa20f1ca8a3e1dbf97c91584c8891 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2134,6 +2134,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2071,6 +2071,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.getPlayerList().reloadResources(); this.getPlayerList().reloadResources();
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary()); this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager); 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. 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 diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 75073ab08a90bd0ce8afc54634e7d61d50650742..4c9a5b53d5b170593c759de1d5dc3c411d9d50b2 100644 index 2f8715e200b9b8ae4c4b70ddd7cdc3368a109939..fba468f0a15dca041acf00e3865485055d2b8cb1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/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 @@ -657,7 +657,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -31,10 +31,10 @@ index 75073ab08a90bd0ce8afc54634e7d61d50650742..4c9a5b53d5b170593c759de1d5dc3c41
} }
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e68a29eb0c81285039a1a980d8b9b83f0b1d022e..522b5575e7e465ccf235fad7d2e87c92074312bd 100644 index 7040b3b9b743b4f88f00da698e37afa42f277990..945d702f5fd204b2197d445e74bb941e814c09f8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -162,6 +162,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -161,6 +161,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start // CraftBukkit start
private static final int CURRENT_LEVEL = 2; private static final int CURRENT_LEVEL = 2;
@ -42,7 +42,7 @@ index e68a29eb0c81285039a1a980d8b9b83f0b1d022e..522b5575e7e465ccf235fad7d2e87c92
static boolean isLevelAtLeast(CompoundTag tag, int level) { static boolean isLevelAtLeast(CompoundTag tag, int level) {
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level; return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
} }
@@ -1870,6 +1871,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -1836,6 +1837,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} }
public void moveTo(double x, double y, double z, float yaw, float pitch) { public void moveTo(double x, double y, double z, float yaw, float pitch) {
@ -57,7 +57,7 @@ index e68a29eb0c81285039a1a980d8b9b83f0b1d022e..522b5575e7e465ccf235fad7d2e87c92
this.setYRot(yaw); this.setYRot(yaw);
this.setXRot(pitch); 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 diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
index f4e1a540243d1f699dd2ef407707af27517d9360..b90c1e4e03f85dbfa7134bffd8da59330cea1e28 100644 index 0c14b382e7660ce518096e9f26525ccea57a1bf9..a9c74ef33182505b6982fea273a760e937ddbf51 100644
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
+++ b/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 { @@ -169,6 +169,7 @@ public abstract class BaseSpawner {

View file

@ -6,7 +6,7 @@ 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 diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 489db5b6cf82c518806dbabc43ec18fca7e672c4..7227d29c6ecf77b026c84e06a3c605926e1f7e5e 100644 index 5089fe44bdd1d20b6b54ef26e8107c5c75ff3ea2..53404e9a6f5f3aff625ce2e247bea1bfe478a996 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1512,6 +1512,12 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1512,6 +1512,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -23,7 +23,7 @@ index 489db5b6cf82c518806dbabc43ec18fca7e672c4..7227d29c6ecf77b026c84e06a3c60592
if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) { if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
return false; return false;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 5b951937511126d58665c5e2baf18186a7a8d325..60c18af9253607bc51ecb9d23c23e652a9ba36e9 100644 index 9f3450d6bbd330a2aebd271a086965bf364c9fe4..a157ccbedb94f287c610975d6c3cfb66a3bddbe8 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -431,10 +431,12 @@ public class ServerPlayerGameMode { @@ -431,10 +431,12 @@ public class ServerPlayerGameMode {

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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 522b5575e7e465ccf235fad7d2e87c92074312bd..6ee2dc0ef43ffa89b2692adc01b3fd6090f5cbf6 100644 index 945d702f5fd204b2197d445e74bb941e814c09f8..d26516fd10ec60bc8e27490df8e1f70aa0976d5c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4507,4 +4507,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -4473,4 +4473,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
void accept(Entity entity, double x, double y, double z); 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 diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6ee2dc0ef43ffa89b2692adc01b3fd6090f5cbf6..c359ba2c20a5f1a63a8342ba593ba51dc8daa905 100644 index d26516fd10ec60bc8e27490df8e1f70aa0976d5c..49bea2b71d4fd3f2e38eabd1ebb57dd66d9abe0b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4512,5 +4512,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S @@ -4478,5 +4478,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public static int nextEntityId() { public static int nextEntityId() {
return ENTITY_COUNTER.incrementAndGet(); 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 diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2600be3ec00a1ba8cff5f03c8e3f7a06a05bbeaf..bb2de4fafa5a21c7dbf71dbad4bd01d0e6ece36f 100644 index 903d43aaa84fa20f1ca8a3e1dbf97c91584c8891..abee10fbb354e22f6c41b04d9f281ffeafdc4498 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2217,13 +2217,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2154,13 +2154,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.isEnforceWhitelist()) { if (this.isEnforceWhitelist()) {
PlayerList playerlist = source.getServer().getPlayerList(); PlayerList playerlist = source.getServer().getPlayerList();
UserWhiteList whitelist = playerlist.getWhiteList(); UserWhiteList whitelist = playerlist.getWhiteList();

View file

@ -7,7 +7,7 @@ if multiple threads from worldgen sort at same time, it will crash.
So make a copy of the list for sorting purposes. So make a copy of the list for sorting purposes.
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java
index 281b5cf91135984a37ad013614c910f7d4d2fee3..79e7a7adf9f9d8b9fee7ae3bb3bebab86fa7fd72 100644 index 419eadbe31b86b7192fd7a63268d547705e7c7ce..4b31a91a8d8a3b231e323692d0a0f7ae04dc7e89 100644
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java --- a/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/GateBehavior.java
@@ -17,7 +17,7 @@ public class GateBehavior<E extends LivingEntity> implements BehaviorControl<E> @@ -17,7 +17,7 @@ public class GateBehavior<E extends LivingEntity> implements BehaviorControl<E>

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Fix for large move vectors crashing server
Check movement distance also based on current position. 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 diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4c9a5b53d5b170593c759de1d5dc3c411d9d50b2..da28ef2db1b96a79ffae87518b8c77647f3f13df 100644 index fba468f0a15dca041acf00e3865485055d2b8cb1..8682ba8d677461842fbb0b40a3d5fdd4d22a8e9e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/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 @@ -473,9 +473,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl

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. 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 diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 92f250b9cc965a433dc9b9de1f9bfeb2acf4363e..15021a6791a5f76c3bb55e88a32b41d0c0ebaf58 100644 index f8246abc1bf9be51e93d645e03b9223326e919f9..b0c61b274c24e2ced86a6acc0ea007a80e61fd3e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/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 { @@ -159,7 +159,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

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