diff --git a/gradle.properties b/gradle.properties index 97e670557..e65fbd163 100644 --- a/gradle.properties +++ b/gradle.properties @@ -25,5 +25,5 @@ pufferfishRepo = https://github.com/PlazmaMC/Pufferfish pufferfishBranch = ver/1.20 usePufferfish = true -paperCommit = 4e10fadfdc8f854feeabf916c23a71e21fb0b29f -purpurCommit = e8f8f9345b7f7110e8f85e542c0cbccbb0fb1475 +paperCommit = 347bbe389786d5cdae7cd1c6ec32cacba2a9aac7 +purpurCommit = a5b3783e35e3486ec3b0829e54d3eff665030bb7 diff --git a/patches/api/0002-Purpur-API-Changes.patch b/patches/api/0002-Purpur-API-Changes.patch index dd795462b..debaf35ec 100644 --- a/patches/api/0002-Purpur-API-Changes.patch +++ b/patches/api/0002-Purpur-API-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny -Date: Sun, 26 May 2024 20:53:49 +0900 +Date: Mon, 27 May 2024 13:23:14 +0900 Subject: [PATCH] Purpur API Changes PurpurMC diff --git a/patches/server/0001-Pufferfish-Server-Changes.patch b/patches/server/0001-Pufferfish-Server-Changes.patch index d2c331a13..c7b9f5606 100644 --- a/patches/server/0001-Pufferfish-Server-Changes.patch +++ b/patches/server/0001-Pufferfish-Server-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Kevin Raneri -Date: Sun, 26 May 2024 20:53:48 +0900 +Date: Mon, 27 May 2024 13:23:13 +0900 Subject: [PATCH] Pufferfish Server Changes Pufferfish @@ -2470,7 +2470,7 @@ index b99f50604bafecbc68835974c9ed0caa91911a40..cadbf2501c87ea22b3ff5db7d8e4aeeb private void getFullChunk(long pos, Consumer chunkConsumer) { diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index f16a69775332a08ed0e87d27acd0fc959359694c..05d7b66bb1087613e528b25b4e9e1e5d00e5a916 100644 +index a2279262c93408c11f5d2290b48fd794975e8cfe..ba1e0a61d3ecf73bfe962b5dfe892b4509278ae8 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -191,6 +191,7 @@ public class ServerEntity { @@ -2546,7 +2546,7 @@ index ca56a0b596976448da6bb2a0e82b3d5cd4133e12..377ca8c01864d6817eff30d33403bc15 if (this.isRainingAt(blockposition)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b9b3277c8ed94e0cd30b20b9c00a33eaad48e5ac..309d173a74cb4966e567c0c1700c425a7f6203f4 100644 +index c450447585af4c8cdc87abe871c229ff895c3e53..81a20529f66883166ebfbebd001d2330bb0070d2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1154,6 +1154,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2669,10 +2669,10 @@ index f402dbbfe3a443e6bc51f88b85abe937852b52f0..c960ddfe628051257cca0d25da385c1d float DEFAULT_DISTANCE_BUFFER = 4.0F; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 25ea45a528612d1a2a2d77293b3802f473a52f38..ef92c5ef523bd08a524e6e91b45e2fa63bc69c48 100644 +index 4ee843dfd826772c9157ca421d8fe1f36f814b51..645a2b045af1bcd3d25d799a08e5e024fd131370 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -312,7 +312,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -311,7 +311,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public double yo; public double zo; private Vec3 position; @@ -2681,7 +2681,7 @@ index 25ea45a528612d1a2a2d77293b3802f473a52f38..ef92c5ef523bd08a524e6e91b45e2fa6 private ChunkPos chunkPosition; private Vec3 deltaMovement; private float yRot; -@@ -426,6 +426,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -425,6 +425,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess private UUID originWorld; public boolean freezeLocked = false; // Paper - Freeze Tick Lock API public boolean fixedPose = false; // Paper - Expand Pose API @@ -2691,7 +2691,7 @@ index 25ea45a528612d1a2a2d77293b3802f473a52f38..ef92c5ef523bd08a524e6e91b45e2fa6 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -864,6 +867,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -863,6 +866,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public void tick() { @@ -2704,7 +2704,7 @@ index 25ea45a528612d1a2a2d77293b3802f473a52f38..ef92c5ef523bd08a524e6e91b45e2fa6 this.baseTick(); } -@@ -4484,16 +4493,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4483,16 +4492,18 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { @@ -2730,7 +2730,7 @@ index 25ea45a528612d1a2a2d77293b3802f473a52f38..ef92c5ef523bd08a524e6e91b45e2fa6 double d1 = 0.0D; boolean flag = this.isPushedByFluid(); boolean flag1 = false; -@@ -4501,14 +4512,61 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4500,14 +4511,61 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess int k1 = 0; BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos(); @@ -2798,7 +2798,7 @@ index 25ea45a528612d1a2a2d77293b3802f473a52f38..ef92c5ef523bd08a524e6e91b45e2fa6 if (d2 >= axisalignedbb.minY) { flag1 = true; -@@ -4530,9 +4588,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4529,9 +4587,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end } } @@ -2825,7 +2825,7 @@ index a46bf73c608641bf1f00fd55242de71a0f2ee06e..e6edbe6177b168d85759bd9c414dc87e private String descriptionId; @Nullable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index ef0f118aecf0893e45cb9423a677d7e42496324b..d2f3597e590d54753f53759680c6617a98d4f913 100644 +index 0ddf2e1a6d2ea836f8a140a435721e0ce96bd8d2..1405bfc9cf22265a975cca1d8abfae6020a5dd49 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -150,7 +150,6 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -2887,7 +2887,7 @@ index ef0f118aecf0893e45cb9423a677d7e42496324b..d2f3597e590d54753f53759680c6617a if (this.isSpectator()) { return false; diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index a80f313771575c1f772d23ef2469a2dce7b1688c..4dcd23324921373975d4ef8e1c4b3fd10292fdca 100644 +index 9f42563699508fcb3d8a96cfdfc25a7bffd99759..706555cb6b56372411d1ec607d25300d57789b7d 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -237,14 +237,16 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti @@ -3120,7 +3120,7 @@ index 290d41136f5ec7671bc4990dfe50da0a770c124d..0d34e9e0f7ce35c3c28a9216cf3cdd5e this.level().getProfiler().pop(); this.level().getProfiler().push("tadpoleActivityUpdate"); diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 02e49c7ae5e120302b6479cf3e3934b9217eebf0..81c9f1c2895adedec246732df9f9dadddfa5f345 100644 +index 376bcbc189008464f4d518c1e07643431ba96306..07bdea8a7d6706839a758afe0242202c7e841416 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -190,9 +190,11 @@ public class Goat extends Animal { @@ -3390,7 +3390,7 @@ index 74c596264d4da551437bd2a23e1c70022cfc73fc..0e4d180d257d7180a8e1300f35924d0c if (entity != null) { this.ownerUUID = entity.getUUID(); diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java -index 2704389bc3ec6dbbf1b568a4380972f8c0d62d15..c53cdaa59da87d96e34f06185b1f73e56a5bfc6c 100644 +index 9549eee0d92f322bd5232abd7e695213660c2e22..2cd8ac8840c2c0346fbf209c5ae3bb67eb3905e8 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java @@ -30,7 +30,10 @@ import org.bukkit.inventory.InventoryHolder; @@ -3404,7 +3404,7 @@ index 2704389bc3ec6dbbf1b568a4380972f8c0d62d15..c53cdaa59da87d96e34f06185b1f73e5 @Nullable public ResourceKey lootTable; public long lootTableSeed; -@@ -92,12 +95,18 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme +@@ -86,12 +89,18 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme protected AbstractMinecartContainer(EntityType type, Level world) { super(type, world); @@ -3425,10 +3425,10 @@ index 2704389bc3ec6dbbf1b568a4380972f8c0d62d15..c53cdaa59da87d96e34f06185b1f73e5 } @Override -@@ -166,6 +175,10 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme +@@ -158,6 +167,10 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme + @Override protected void readAdditionalSaveData(CompoundTag nbt) { super.readAdditionalSaveData(nbt); - this.lootableData.loadNbt(nbt); // Paper + // Pufferfish start + this.itemStacksOptimized = new gg.airplane.structs.ItemListWithBitset(this.getContainerSize()); + this.itemStacks = this.itemStacksOptimized.nonNullList; @@ -3437,10 +3437,10 @@ index 2704389bc3ec6dbbf1b568a4380972f8c0d62d15..c53cdaa59da87d96e34f06185b1f73e5 } diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java -index dd1bdb4bb87a3a59c229ba76b36841d199717624..42d13b03119af88838ca9cd36000162c04787493 100644 +index 5f51e64cb0611a4ba6bdcdcacbcba1063a7f3a5c..cc1e5882bee94864ad189d7f01ce78223411e51d 100644 --- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java +++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java -@@ -56,7 +56,7 @@ public class EndCrystalItem extends Item { +@@ -57,7 +57,7 @@ public class EndCrystalItem extends Item { world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.ENTITY_PLACE, blockposition1); EndDragonFight enderdragonbattle = ((ServerLevel) world).getDragonFight(); @@ -3497,10 +3497,10 @@ index 3554109bcc4651ca93b6275c914e57e007e2204e..60c7a9520335de8e2638572100affcfd autorecipestackmanager.initialize(this); // Paper - better exact choice recipes int i = 0; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 0a8eeebb2d702ebcefd9f26cc0f41d1eab497902..85368ac2e4b420d91c96860344f86d1a64d0d47e 100644 +index 14281a4e72f49dc4eb2ca3da8479c1f81a3a175d..4146bf151ffa5abf006f65a7290f6214dda3392f 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -203,6 +203,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -204,6 +204,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end public abstract ResourceKey getTypeKey(); @@ -3509,7 +3509,7 @@ index 0a8eeebb2d702ebcefd9f26cc0f41d1eab497902..85368ac2e4b420d91c96860344f86d1a protected Level(WritableLevelData worlddatamutable, ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, Supplier supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config; Async-Anti-Xray: Pass executor this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot -@@ -1299,13 +1301,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1300,13 +1302,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { try { tickConsumer.accept(entity); MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick @@ -3525,7 +3525,7 @@ index 0a8eeebb2d702ebcefd9f26cc0f41d1eab497902..85368ac2e4b420d91c96860344f86d1a // Paper end - Prevent block entity and entity crashes } } -@@ -1780,6 +1782,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1781,6 +1783,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public ProfilerFiller getProfiler() { @@ -3765,10 +3765,10 @@ index 8310d132006043e93c612890514c4c7f3eb1c74d..1bd1f88aea2c841c20e21f1472f2ccfb public static void entityInside(Level world, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -index 17da915ffa638500a83b67db0940a7b9a9b333a1..5682039a18de20bacdac804db8da47953b22d653 100644 +index e2752752417c50b06f7c15b7d00bda0eaad3b0ae..23cb5d00e9f171f445f3dc8cd3947450da979da3 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -@@ -99,7 +99,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc +@@ -48,7 +48,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc @Override public boolean isEmpty() { this.unpackLootTable(null); @@ -3778,7 +3778,7 @@ index 17da915ffa638500a83b67db0940a7b9a9b333a1..5682039a18de20bacdac804db8da4795 @Override 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 2a8609e33716949ff1877b6d10f64a9d7a7c81e9..8d6b95bc46e17fcbda6dbec0f77a451df884cbaa 100644 +index 14ee7b5b9b804bebd4e2a846b238547a28a36035..e5b7a14c0325cf0c35a03890d2526a90a1b17fad 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -88,6 +88,18 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0002-Purpur-Server-Changes.patch b/patches/server/0002-Purpur-Server-Changes.patch index fa731633d..4cefa40ea 100644 --- a/patches/server/0002-Purpur-Server-Changes.patch +++ b/patches/server/0002-Purpur-Server-Changes.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: granny -Date: Sun, 26 May 2024 20:53:49 +0900 +Date: Mon, 27 May 2024 13:23:14 +0900 Subject: [PATCH] Purpur Server Changes PurpurMC @@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/build.gradle.kts b/build.gradle.kts -index d877dbae82b775250739b5b8d84e163d37a39e35..4c4d242475c5229e9cdae69fcc328d52af6df4b8 100644 +index d877dbae82b775250739b5b8d84e163d37a39e35..e4c14967c18b4f2a623c17b5ba72fc076b904755 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -13,7 +13,7 @@ configurations.named(log4jPlugins.compileClasspathConfigurationName) { @@ -48,7 +48,13 @@ index d877dbae82b775250739b5b8d84e163d37a39e35..4c4d242475c5229e9cdae69fcc328d52 testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test testImplementation("org.junit.jupiter:junit-jupiter:5.10.2") testImplementation("org.hamcrest:hamcrest:2.2") -@@ -95,14 +99,14 @@ tasks.jar { +@@ -90,19 +94,19 @@ tasks.jar { + val mcVersion = rootProject.providers.gradleProperty("mcVersion").get() + val build = System.getenv("BUILD_NUMBER") ?: null + val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim() +- val implementationVersion = "git-Pufferfish-$gitHash" // Pufferfish ++ val implementationVersion = "$mcVersion-${build ?: "DEV"}-$gitHash" // Pufferfish // Purpur + val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", @@ -2360,7 +2366,7 @@ index cadbf2501c87ea22b3ff5db7d8e4aeebfa3d3abc..5eb7bcf492ee354ef775cd8d09c7ca2b } diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 05d7b66bb1087613e528b25b4e9e1e5d00e5a916..78be6cea03f40edfa90b5d9df014d5cf22b81f61 100644 +index ba1e0a61d3ecf73bfe962b5dfe892b4509278ae8..e16dcb7f60bc3cf2cbef4674b23f12e1e5bd59d3 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -77,7 +77,7 @@ public class ServerEntity { @@ -2878,7 +2884,7 @@ index 377ca8c01864d6817eff30d33403bc15bf85e6d4..b3d47d16fb9733ca5cc4f90051ee8694 } // Paper end - Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3bd21646b1 100644 +index 6a4637eef14cbd84bbe26ef16f004b8f93367a3d..4a29e90ff2a0fe9c5be094400d79ab89e61c437d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -298,6 +298,10 @@ public class ServerPlayer extends Player { @@ -2892,7 +2898,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b // Paper start - replace player chunk loader private final java.util.concurrent.atomic.AtomicReference viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); -@@ -608,6 +612,9 @@ public class ServerPlayer extends Player { +@@ -609,6 +613,9 @@ public class ServerPlayer extends Player { }); } @@ -2902,7 +2908,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b } @Override -@@ -684,6 +691,9 @@ public class ServerPlayer extends Player { +@@ -685,6 +692,9 @@ public class ServerPlayer extends Player { }); } @@ -2912,7 +2918,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b } // CraftBukkit start - World fallback code, either respawn location or global spawn -@@ -813,6 +823,15 @@ public class ServerPlayer extends Player { +@@ -814,6 +824,15 @@ public class ServerPlayer extends Player { this.trackEnteredOrExitedLavaOnVehicle(); this.updatePlayerAttributes(); this.advancements.flushDirty(this); @@ -2928,7 +2934,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b } private void updatePlayerAttributes() { -@@ -1076,6 +1095,7 @@ public class ServerPlayer extends Player { +@@ -1077,6 +1096,7 @@ public class ServerPlayer extends Player { })); PlayerTeam scoreboardteam = this.getTeam(); @@ -2936,7 +2942,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b if (scoreboardteam != null && scoreboardteam.getDeathMessageVisibility() != Team.Visibility.ALWAYS) { if (scoreboardteam.getDeathMessageVisibility() == Team.Visibility.HIDE_FOR_OTHER_TEAMS) { this.server.getPlayerList().broadcastSystemToTeam(this, ichatbasecomponent); -@@ -1179,6 +1199,16 @@ public class ServerPlayer extends Player { +@@ -1180,6 +1200,16 @@ public class ServerPlayer extends Player { if (this.isInvulnerableTo(source)) { return false; } else { @@ -2953,7 +2959,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b boolean flag = this.server.isDedicatedServer() && this.isPvpAllowed() && source.is(DamageTypeTags.IS_FALL); if (!flag && this.spawnInvulnerableTime > 0 && !source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) { -@@ -1290,7 +1320,7 @@ public class ServerPlayer extends Player { +@@ -1291,7 +1321,7 @@ public class ServerPlayer extends Player { PortalInfo shapedetectorshape = this.findDimensionEntryPoint(worldserver); if (shapedetectorshape != null) { @@ -2962,7 +2968,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b worldserver = shapedetectorshape.world; // CraftBukkit if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event if (resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit -@@ -1313,8 +1343,8 @@ public class ServerPlayer extends Player { +@@ -1314,8 +1344,8 @@ public class ServerPlayer extends Player { worldserver = ((CraftWorld) exit.getWorld()).getHandle(); // CraftBukkit end @@ -2973,7 +2979,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b if (true) { // CraftBukkit this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds -@@ -1325,13 +1355,14 @@ public class ServerPlayer extends Player { +@@ -1326,13 +1356,14 @@ public class ServerPlayer extends Player { playerlist.sendPlayerPermissionLevel(this); worldserver1.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION); this.unsetRemoved(); @@ -2989,7 +2995,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b this.triggerDimensionChangeTriggers(worldserver1); this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities())); playerlist.sendLevelInfo(this, worldserver); -@@ -1481,7 +1512,7 @@ public class ServerPlayer extends Player { +@@ -1482,7 +1513,7 @@ public class ServerPlayer extends Player { return entitymonster.isPreventingPlayerRest(this); }); @@ -2998,7 +3004,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b return Either.left(Player.BedSleepingProblem.NOT_SAFE); } } -@@ -1521,7 +1552,19 @@ public class ServerPlayer extends Player { +@@ -1522,7 +1553,19 @@ public class ServerPlayer extends Player { }); if (!this.serverLevel().canSleepThroughNights()) { @@ -3019,7 +3025,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b } ((ServerLevel) this.level()).updateSleepingPlayerList(); -@@ -1643,6 +1686,7 @@ public class ServerPlayer extends Player { +@@ -1644,6 +1687,7 @@ public class ServerPlayer extends Player { @Override public void openTextEdit(SignBlockEntity sign, boolean front) { @@ -3027,7 +3033,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b this.connection.send(new ClientboundBlockUpdatePacket(this.level(), sign.getBlockPos())); this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front)); } -@@ -1977,6 +2021,26 @@ public class ServerPlayer extends Player { +@@ -1978,6 +2022,26 @@ public class ServerPlayer extends Player { this.lastSentExp = -1; // CraftBukkit - Added to reset } @@ -3054,7 +3060,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b @Override public void displayClientMessage(Component message, boolean overlay) { this.sendSystemMessage(message, overlay); -@@ -2296,8 +2360,68 @@ public class ServerPlayer extends Player { +@@ -2297,8 +2361,68 @@ public class ServerPlayer extends Player { public void resetLastActionTime() { this.lastActionTime = Util.getMillis(); @@ -3123,7 +3129,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b public ServerStatsCounter getStats() { return this.stats; } -@@ -2871,4 +2995,50 @@ public class ServerPlayer extends Player { +@@ -2872,4 +2996,50 @@ public class ServerPlayer extends Player { return (CraftPlayer) super.getBukkitEntity(); } // CraftBukkit end @@ -3175,7 +3181,7 @@ index a645ad66af061966c5e47cae677026b35a55c486..a7ba658a4dc6eeb9d5bc854289c21b3b + // Purpur end } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 5cedce1f432f6b809b25269242a16477682c824f..6d194797d8fe2cd6e5652d596f4bc66ffc3b6375 100644 +index 1047027610624c9ba4bb5afd5d7f0714a062b198..7424246750d6ceca1acd5d9ebfd48f0d66504c5d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -400,6 +400,7 @@ public class ServerPlayerGameMode { @@ -3322,7 +3328,7 @@ index 308aef9c4933b2bcdd622a34b68efab4a220fe4d..b82a72775f9de5ad65ae46a8b97f93a7 private boolean checkIfClosed(long time) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 309d173a74cb4966e567c0c1700c425a7f6203f4..87341fb1546bf01a8c14e687e841681b112ba23b 100644 +index 81a20529f66883166ebfbebd001d2330bb0070d2..972d8975d1bc04eb6c0c05f9ca8044f699c504a8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -332,6 +332,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -4181,7 +4187,7 @@ index f43bf280999ff3860cc702def50cc62b131eb1bd..66d9e99a351f5fc6cf58be3bee4397d9 } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6ed98d69a4 100644 +index 645a2b045af1bcd3d25d799a08e5e024fd131370..c9b3577a3992c11f6c299945362ac9be6c0c96e1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -163,7 +163,7 @@ import org.bukkit.plugin.PluginManager; @@ -4193,7 +4199,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e // CraftBukkit start private static final int CURRENT_LEVEL = 2; public boolean preserveMotion = true; // Paper - Fix Entity Teleportation and cancel velocity if teleported; keep initial motion on first setPositionRotation -@@ -340,6 +340,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -339,6 +339,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public double xOld; public double yOld; public double zOld; @@ -4201,7 +4207,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e public boolean noPhysics; public final RandomSource random; public int tickCount; -@@ -381,7 +382,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -380,7 +381,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess private final Set tags; private final double[] pistonDeltas; private long pistonDeltasGameTime; @@ -4210,7 +4216,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e private float eyeHeight; public boolean isInPowderSnow; public boolean wasInPowderSnow; -@@ -429,6 +430,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -428,6 +429,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public boolean activatedPriorityReset = false; // Pufferfish - DAB public int activatedPriority = gg.pufferfish.pufferfish.PufferfishConfig.maximumActivationPrio; // Pufferfish - DAB (golf score) public final BlockPos.MutableBlockPos cachedBlockPos = new BlockPos.MutableBlockPos(); // Pufferfish - reduce entity allocations @@ -4218,7 +4224,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -560,6 +562,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -559,6 +561,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } @@ -4244,7 +4250,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e public final boolean hardCollides() { return this.hardCollides; } -@@ -580,7 +601,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -579,7 +600,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.bb = Entity.INITIAL_AABB; this.stuckSpeedMultiplier = Vec3.ZERO; this.nextStep = 1.0F; @@ -4253,7 +4259,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e this.remainingFireTicks = -this.getFireImmuneTicks(); this.fluidHeight = new Object2DoubleArrayMap(2); this.fluidOnEyes = new HashSet(); -@@ -869,7 +890,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -868,7 +889,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void tick() { // Pufferfish start - entity TTL if (type != EntityType.PLAYER && type.ttl >= 0 && this.tickCount >= type.ttl) { @@ -4262,7 +4268,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e return; } // Pufferfish end - entity TTL -@@ -886,7 +907,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -885,7 +906,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // CraftBukkit end public void baseTick() { @@ -4271,7 +4277,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Prevent entity loading causing async lookups this.inBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { -@@ -947,7 +968,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -946,7 +967,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } this.firstTick = false; @@ -4280,7 +4286,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } public void setSharedFlagOnFire(boolean onFire) { -@@ -956,10 +977,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -955,10 +976,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void checkBelowWorld() { // Paper start - Configurable nether ceiling damage @@ -4293,7 +4299,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e this.onBelowWorld(); } -@@ -1164,7 +1186,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1163,7 +1185,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } @@ -4302,7 +4308,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) { movement = movement.multiply(this.stuckSpeedMultiplier); this.stuckSpeedMultiplier = Vec3.ZERO; -@@ -1173,7 +1195,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1172,7 +1194,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess // Paper start - ignore movement changes while inactive. if (isTemporarilyActive && !(this instanceof ItemEntity) && movement == getDeltaMovement() && movementType == MoverType.SELF) { setDeltaMovement(Vec3.ZERO); @@ -4311,7 +4317,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e return; } // Paper end -@@ -1194,8 +1216,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1193,8 +1215,8 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z); } @@ -4322,7 +4328,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e boolean flag = !Mth.equal(movement.x, vec3d1.x); boolean flag1 = !Mth.equal(movement.z, vec3d1.z); -@@ -1214,7 +1236,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1213,7 +1235,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.checkFallDamage(vec3d1.y, this.onGround(), iblockdata, blockposition); if (this.isRemoved()) { @@ -4331,7 +4337,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } else { if (this.horizontalCollision) { Vec3 vec3d2 = this.getDeltaMovement(); -@@ -1352,7 +1374,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1351,7 +1373,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.setRemainingFireTicks(-this.getFireImmuneTicks()); } @@ -4340,7 +4346,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } } // Paper start - detailed watchdog information -@@ -1867,7 +1889,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1866,7 +1888,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean fireImmune() { @@ -4349,7 +4355,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { -@@ -1940,7 +1962,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -1939,7 +1961,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return this.isInWater() || flag; } @@ -4358,7 +4364,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e Entity entity = this.getVehicle(); if (entity instanceof Boat entityboat) { -@@ -2564,6 +2586,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2563,6 +2585,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess nbttagcompound.putBoolean("Paper.FreezeLock", true); } // Paper end @@ -4370,7 +4376,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e return nbttagcompound; } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT"); -@@ -2711,6 +2738,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2710,6 +2737,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess freezeLocked = nbt.getBoolean("Paper.FreezeLock"); } // Paper end @@ -4382,7 +4388,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT"); -@@ -3095,6 +3127,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3094,6 +3126,13 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.passengers = ImmutableList.copyOf(list); } @@ -4396,7 +4402,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e this.gameEvent(GameEvent.ENTITY_MOUNT, passenger); } } -@@ -3134,6 +3173,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3133,6 +3172,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return false; } // CraftBukkit end @@ -4411,7 +4417,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e if (this.passengers.size() == 1 && this.passengers.get(0) == entity) { this.passengers = ImmutableList.of(); } else { -@@ -3212,12 +3259,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3211,12 +3258,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return Vec3.directionFromRotation(this.getRotationVector()); } @@ -4428,7 +4434,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } this.isInsidePortal = true; -@@ -3235,7 +3285,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3234,7 +3284,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey); if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit @@ -4437,7 +4443,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e this.portalTime = i; // Paper start - Add EntityPortalReadyEvent io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER); -@@ -3253,7 +3303,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3252,7 +3302,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } } // Paper - Add EntityPortalReadyEvent // CraftBukkit end @@ -4446,7 +4452,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } this.isInsidePortal = false; -@@ -3444,7 +3494,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3443,7 +3493,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public int getMaxAirSupply() { @@ -4455,7 +4461,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } public int getAirSupply() { -@@ -3713,14 +3763,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3712,14 +3762,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper end - Fix item duplication and teleport issues if (this.level() instanceof ServerLevel && !this.isRemoved()) { @@ -4472,7 +4478,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit if (shapedetectorshape == null) { -@@ -3759,7 +3809,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3758,7 +3808,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.unRide(); // CraftBukkit end @@ -4481,7 +4487,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e // Paper start - Fix item duplication and teleport issues if (this instanceof Mob) { ((Mob) this).dropLeash(true, true); // Paper drop lead -@@ -3786,10 +3836,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3785,10 +3835,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } this.removeAfterChangingDimensions(); @@ -4494,7 +4500,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e return entity; } } else { -@@ -3909,7 +3959,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -3908,7 +3958,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public boolean canChangeDimensions() { @@ -4503,7 +4509,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { -@@ -4205,6 +4255,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4204,6 +4254,20 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return SlotAccess.NULL; } @@ -4524,7 +4530,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e @Override public void sendSystemMessage(Component message) {} -@@ -4492,6 +4556,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4491,6 +4555,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess this.yRotO = this.getYRot(); } @@ -4537,7 +4543,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e public boolean updateFluidHeightAndDoFluidPushing(TagKey tag, double speed) { if (false && this.touchingUnloadedChunk()) { // Pufferfish - cost of a lookup here is the same cost as below, so skip return false; -@@ -4890,7 +4960,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -4889,7 +4959,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } public float maxUpStep() { @@ -4546,7 +4552,7 @@ index ef92c5ef523bd08a524e6e91b45e2fa63bc69c48..d918056a0bbfad35b572db1b0a196b6e } public void onExplosionHit(@Nullable Entity entity) {} -@@ -5062,4 +5132,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -5061,4 +5131,46 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); } // Paper end - Expose entity id counter @@ -4751,7 +4757,7 @@ index 09fdea983772612ef3fff6b2da3cf469a34e4ec0..3e2ea26c23e88c395856b65001f2895d protected ParticleOptions getInkParticle() { return ParticleTypes.GLOW_SQUID_INK; diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d2f3597e590d54753f53759680c6617a98d4f913..2b72c98c0827e91ed11007c4cfc8155a89df38c7 100644 +index 1405bfc9cf22265a975cca1d8abfae6020a5dd49..7894a41a212c31f96c758608f4f8fc2b50e63661 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -228,9 +228,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -5180,7 +5186,7 @@ index d2f3597e590d54753f53759680c6617a98d4f913..2b72c98c0827e91ed11007c4cfc8155a this.gameEvent(GameEvent.ELYTRA_GLIDE); diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 4dcd23324921373975d4ef8e1c4b3fd10292fdca..a2bae50c126208621909ada50cdddd625c8b1912 100644 +index 706555cb6b56372411d1ec607d25300d57789b7d..9245a9d38ae6985fee36ab0efea006c9e2b0632a 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -75,6 +75,7 @@ import net.minecraft.world.item.SpawnEggItem; @@ -6763,7 +6769,7 @@ index 824e5e4fe7619ae46061c3c978c9a044db8c84ab..f0b6118a9995bb41836685bbf94d2e7f public ItemStack getBucketItemStack() { return new ItemStack(Items.COD_BUCKET); diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java -index 5a7b1be351834a6b8889b1380cede1be025cb302..1691a98caabf27ea092a9b422649ac84bc0a7235 100644 +index e336934f37075a827843e4b1bb2b6b660d2c60c9..4541e72bc93b19df6aecc781b4e381a7224aa4a7 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cow.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cow.java @@ -2,6 +2,7 @@ package net.minecraft.world.entity.animal; @@ -6874,16 +6880,16 @@ index 5a7b1be351834a6b8889b1380cede1be025cb302..1691a98caabf27ea092a9b422649ac84 ItemStack itemstack = player.getItemInHand(hand); if (itemstack.is(Items.BUCKET) && !this.isBaby()) { -@@ -101,7 +152,7 @@ public class Cow extends Animal { - PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) player.level(), player, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET, hand); +@@ -102,7 +153,7 @@ public class Cow extends Animal { if (event.isCancelled()) { + player.containerMenu.sendAllDataToRemote(); // Paper - Fix inventory desync - return InteractionResult.PASS; + return tryRide(player, hand); // Purpur } // CraftBukkit end -@@ -110,6 +161,10 @@ public class Cow extends Animal { +@@ -111,6 +162,10 @@ public class Cow extends Animal { player.setItemInHand(hand, itemstack1); return InteractionResult.sidedSuccess(this.level().isClientSide); @@ -6894,7 +6900,7 @@ index 5a7b1be351834a6b8889b1380cede1be025cb302..1691a98caabf27ea092a9b422649ac84 } else { return super.mobInteract(player, hand); } -@@ -125,4 +180,69 @@ public class Cow extends Animal { +@@ -126,4 +181,69 @@ public class Cow extends Animal { public EntityDimensions getDefaultDimensions(Pose pose) { return this.isBaby() ? Cow.BABY_DIMENSIONS : super.getDefaultDimensions(pose); } @@ -9536,7 +9542,7 @@ index 0d34e9e0f7ce35c3c28a9216cf3cdd5eddfe90f6..64d0e2edf0e47bfe3bc5fbdbabac26c4 } diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 81c9f1c2895adedec246732df9f9dadddfa5f345..bbcee6755f8ca24e944b310be505fc5c4cc87e0b 100644 +index 07bdea8a7d6706839a758afe0242202c7e841416..004a0212540c0a9061eb3aed458857d3da4c1c3d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -91,6 +91,38 @@ public class Goat extends Animal { @@ -9597,7 +9603,7 @@ index 81c9f1c2895adedec246732df9f9dadddfa5f345..bbcee6755f8ca24e944b310be505fc5c super.customServerAiStep(); } -@@ -396,6 +428,7 @@ public class Goat extends Animal { +@@ -397,6 +429,7 @@ public class Goat extends Animal { // Paper start - Goat ram API public void ram(net.minecraft.world.entity.LivingEntity entity) { @@ -16261,10 +16267,10 @@ index 786e4a8700cb84b16dd9b8892a0d1d5803924d81..b108ca4c7900ccf6a14ebea01c21c103 // CraftBukkit start Level world = pointer.level(); diff --git a/src/main/java/net/minecraft/world/item/ArmorStandItem.java b/src/main/java/net/minecraft/world/item/ArmorStandItem.java -index 1634a7d5ff06583408cf2f02f2b5f90931b1e02a..fd83261f64c6469aebde8ab13a6777b9b269cea2 100644 +index 066a6e5ed2632a55324ec0d10f2f8a6bf3f30a0f..1921ecf2c0a9f18c93d207692fb9c2db58c9358f 100644 --- a/src/main/java/net/minecraft/world/item/ArmorStandItem.java +++ b/src/main/java/net/minecraft/world/item/ArmorStandItem.java -@@ -58,6 +58,14 @@ public class ArmorStandItem extends Item { +@@ -59,6 +59,14 @@ public class ArmorStandItem extends Item { return InteractionResult.FAIL; } // CraftBukkit end @@ -16494,7 +16500,7 @@ index 4ebd634cff286b10868e26eeb3ecf34abdcab22e..7dc811335caa46870d1d895899a1e6c2 com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack), (org.bukkit.entity.Projectile) entityegg.getBukkitEntity()); if (event.callEvent() && world.addFreshEntity(entityegg)) { diff --git a/src/main/java/net/minecraft/world/item/EndCrystalItem.java b/src/main/java/net/minecraft/world/item/EndCrystalItem.java -index 42d13b03119af88838ca9cd36000162c04787493..a6622bd680be69e1bdcda03392f0f936fbd289c9 100644 +index cc1e5882bee94864ad189d7f01ce78223411e51d..4c827c26656ac487cc8c66eeb67e4f38a29fec36 100644 --- a/src/main/java/net/minecraft/world/item/EndCrystalItem.java +++ b/src/main/java/net/minecraft/world/item/EndCrystalItem.java @@ -27,7 +27,7 @@ public class EndCrystalItem extends Item { @@ -16608,18 +16614,18 @@ index 06497b5141e611cc7a1b6030a7b9c54b5c4eda06..28df1b3230762e52b5458ac93a85c9a5 return InteractionResult.PASS; } diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 893efb2c4a07c33d41e934279dd914a9dbd4ef79..f93cb39c2664b74066bd9ac352137c11e612e5f9 100644 +index 58c38bc4361ddf24716f326b0c6fc626d434756e..4934e912653361dc4af8306d3747850c0c0f4554 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -475,6 +475,7 @@ public final class ItemStack implements DataComponentHolder { - world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710 +@@ -476,6 +476,7 @@ public final class ItemStack implements DataComponentHolder { + world.isBlockPlaceCancelled = true; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent for (BlockState blockstate : blocks) { blockstate.update(true, false); + ((CraftBlock) blockstate.getBlock()).getNMS().getBlock().forgetPlacer(); // Purpur } + world.isBlockPlaceCancelled = false; // Paper - prevent calling cleanup logic when undoing a block place upon a cancelled BlockPlaceEvent world.preventPoiUpdated = false; - -@@ -506,6 +507,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -508,6 +509,7 @@ public final class ItemStack implements DataComponentHolder { if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically block.onPlace(world, newblockposition, oldBlock, true, context); // Paper - pass context } @@ -16627,7 +16633,7 @@ index 893efb2c4a07c33d41e934279dd914a9dbd4ef79..f93cb39c2664b74066bd9ac352137c11 world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point } -@@ -636,6 +638,16 @@ public final class ItemStack implements DataComponentHolder { +@@ -638,6 +640,16 @@ public final class ItemStack implements DataComponentHolder { return this.isDamageableItem() && this.getDamageValue() > 0; } @@ -16644,7 +16650,7 @@ index 893efb2c4a07c33d41e934279dd914a9dbd4ef79..f93cb39c2664b74066bd9ac352137c11 public int getDamageValue() { return Mth.clamp((Integer) this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage()); } -@@ -653,7 +665,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -655,7 +667,7 @@ public final class ItemStack implements DataComponentHolder { int j; if (amount > 0) { @@ -16653,7 +16659,7 @@ index 893efb2c4a07c33d41e934279dd914a9dbd4ef79..f93cb39c2664b74066bd9ac352137c11 int k = 0; for (int l = 0; j > 0 && l < amount; ++l) { -@@ -729,6 +741,12 @@ public final class ItemStack implements DataComponentHolder { +@@ -731,6 +743,12 @@ public final class ItemStack implements DataComponentHolder { this.hurtAndBreak(amount, randomsource, entity, () -> { // Paper - Add EntityDamageItemEvent entity.broadcastBreakEvent(slot); Item item = this.getItem(); @@ -16666,7 +16672,7 @@ index 893efb2c4a07c33d41e934279dd914a9dbd4ef79..f93cb39c2664b74066bd9ac352137c11 // CraftBukkit start - Check for item breaking if (this.count == 1 && entity instanceof net.minecraft.world.entity.player.Player) { org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent((net.minecraft.world.entity.player.Player) entity, this); -@@ -1210,6 +1228,16 @@ public final class ItemStack implements DataComponentHolder { +@@ -1212,6 +1230,16 @@ public final class ItemStack implements DataComponentHolder { return !((ItemEnchantments) this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY)).isEmpty(); } @@ -16732,7 +16738,7 @@ index 0f83ae4b0d5f52ff9ccfff6bbcc31153d45bd619..d0751274e89042715cab8e9e72387042 return stack.isEmpty() ? new ItemStack(Items.BUCKET) : stack; diff --git a/src/main/java/net/minecraft/world/item/MinecartItem.java b/src/main/java/net/minecraft/world/item/MinecartItem.java -index 66074445d3908b9bb1c8d70e1e27d057720ec8e5..0fd4f2ab929df479360755a3f1e58a933ae59520 100644 +index d524fcc191cb95d6ec7f12ae7fceeb8077bb08fc..4b8cebb321eddc852b4ec7def7f51d781f67927b 100644 --- a/src/main/java/net/minecraft/world/item/MinecartItem.java +++ b/src/main/java/net/minecraft/world/item/MinecartItem.java @@ -120,8 +120,9 @@ public class MinecartItem extends Item { @@ -16747,7 +16753,7 @@ index 66074445d3908b9bb1c8d70e1e27d057720ec8e5..0fd4f2ab929df479360755a3f1e58a93 ItemStack itemstack = context.getItemInHand(); if (world instanceof ServerLevel) { -@@ -146,6 +147,6 @@ public class MinecartItem extends Item { +@@ -147,6 +148,6 @@ public class MinecartItem extends Item { itemstack.shrink(1); return InteractionResult.sidedSuccess(world.isClientSide); @@ -17137,10 +17143,10 @@ index 082b804f4793f72e76361f5427f0358273454b3d..133d994d9ac9d4f9527135ac0c77e574 if (this.fire) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef372d20b6 100644 +index 4146bf151ffa5abf006f65a7290f6214dda3392f..6fab30d186d64d51f7dd9af00fccded4c388844c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -171,6 +171,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end - add paper world config public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray @@ -17148,7 +17154,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef public final co.aikar.timings.WorldTimingsHandler timings; // Paper public static BlockPos lastPhysicsProblem; // Spigot private org.spigotmc.TickLimiter entityLimiter; -@@ -178,6 +179,49 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -179,6 +180,49 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public final Map explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public java.util.ArrayDeque redstoneUpdateInfos; // Paper - Faster redstone torch rapid clock removal; Move from Map in BlockRedstoneTorch to here @@ -17198,7 +17204,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef public CraftWorld getWorld() { return this.world; } -@@ -203,12 +247,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -204,12 +248,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end public abstract ResourceKey getTypeKey(); @@ -17215,7 +17221,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef this.generator = gen; this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); -@@ -1250,18 +1296,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1251,18 +1297,18 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } protected void tickBlockEntities() { @@ -17239,7 +17245,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef // Spigot start // Iterator iterator = this.blockEntityTickers.iterator(); boolean flag = this.tickRateManager().runsNormally(); -@@ -1290,10 +1336,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1291,10 +1337,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075 @@ -17252,7 +17258,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef this.spigotConfig.currentPrimedTnt = 0; // Spigot } -@@ -1508,7 +1554,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1509,7 +1555,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @Override public List getEntities(@Nullable Entity except, AABB box, Predicate predicate) { @@ -17261,7 +17267,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef List list = Lists.newArrayList(); ((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call return list; -@@ -1527,7 +1573,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1528,7 +1574,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public void getEntities(EntityTypeTest filter, AABB box, Predicate predicate, List result, int limit) { @@ -17270,7 +17276,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef // Paper start - optimise this call //TODO use limit if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) { -@@ -1782,7 +1828,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1783,7 +1829,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } public ProfilerFiller getProfiler() { @@ -17279,7 +17285,7 @@ index 85368ac2e4b420d91c96860344f86d1a64d0d47e..4f056ad78325187efddc0b7ca3b02eef return (ProfilerFiller) this.profiler.get(); } -@@ -1894,4 +1940,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1895,4 +1941,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return null; } // Paper end - optimize redstone (Alternate Current) @@ -19263,7 +19269,7 @@ index 2034ca2edd3aff61d94416266e75402babd3e741..031fc626d2075cbe0941fecc18840671 protected ResourceKey drops; 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 8d6b95bc46e17fcbda6dbec0f77a451df884cbaa..56dd36a88f11aeac528e7be2998e52324c01fde1 100644 +index e5b7a14c0325cf0c35a03890d2526a90a1b17fad..ab4dd0c8b4b17ff1b54c06b72dc8b3caba430fe2 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -124,7 +124,7 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0005-Cleanup-buildscripts.patch b/patches/server/0005-Cleanup-buildscripts.patch deleted file mode 100644 index ddd0d3599..000000000 --- a/patches/server/0005-Cleanup-buildscripts.patch +++ /dev/null @@ -1,255 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Sun, 26 May 2024 23:18:01 +0900 -Subject: [PATCH] Cleanup buildscripts - - -diff --git a/build.gradle.kts b/build.gradle.kts -index acca28dd3e99821e4f55794946ed27b7e8c780a5..b95eda82341edf50f74da6760b42c47a7365e320 100644 ---- a/build.gradle.kts -+++ b/build.gradle.kts -@@ -43,85 +43,126 @@ paperweight { - craftBukkitPackageVersion.set("v1_20_R4") // also needs to be updated in MappingEnvironment - } - --// Pufferfish Start --tasks.withType { -- val compilerArgs = options.compilerArgs -- compilerArgs.add("--add-modules=jdk.incubator.vector") --} --// Pufferfish End -- --tasks.jar { -- archiveClassifier.set("dev") -- -- manifest { -- val git = Git(rootProject.layout.projectDirectory.path) -- val mcVersion = rootProject.providers.gradleProperty("mcVersion").get() -- val build = System.getenv("BUILD_NUMBER") ?: null -- val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim() -- val implementationVersion = "git-Pufferfish-$gitHash" // Pufferfish -- val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper -- val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper -- attributes( -- "Main-Class" to "org.bukkit.craftbukkit.Main", -- "Implementation-Title" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Rebrand // Plazma - Fork-friendly Rebranding -- "Implementation-Version" to implementationVersion, -- "Implementation-Vendor" to date, // Paper -- "Specification-Title" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Fork-friendly Rebranding -- "Specification-Version" to project.version, -- "Specification-Vendor" to rootProject.providers.gradleProperty("providerName").get(), // Purpur // Plazma - Fork-friendly Rebranding -- "Brand-Id" to rootProject.providers.gradleProperty("brandKey").get(), // Purpur // Plazma - Fork-friendly Rebranding -- "Brand-Name" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Fork-friendly Rebranding -- "Build-Number" to (build ?: ""), -- "Build-Time" to Instant.now().toString(), -- "Git-Branch" to gitBranch, // Paper -- "Git-Commit" to gitHash, // Paper -- "CraftBukkit-Package-Version" to paperweight.craftBukkitPackageVersion.get(), // Paper -- ) -- for (tld in setOf("net", "com", "org")) { -- attributes("$tld/bukkit", "Sealed" to true) -+// Plazma start - Cleanup buildscripts -+tasks { -+ // Pufferfish Start -+ withType { -+ val compilerArgs = options.compilerArgs -+ compilerArgs.add("--add-modules=jdk.incubator.vector") -+ } -+ // Pufferfish End -+ -+ jar { -+ archiveClassifier.set("dev") -+ -+ manifest { -+ val git = Git(rootProject.layout.projectDirectory.path) -+ val mcVersion = rootProject.providers.gradleProperty("mcVersion").get() -+ val build = System.getenv("BUILD_NUMBER") ?: null -+ val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim() -+ val implementationVersion = "git-Pufferfish-$gitHash" // Pufferfish -+ val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper -+ val gitBranch = git("rev-parse", "--abbrev-ref", "HEAD").getText().trim() // Paper -+ attributes( -+ "Main-Class" to "org.bukkit.craftbukkit.Main", -+ "Implementation-Title" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Rebrand // Plazma - Fork-friendly Rebranding -+ "Implementation-Version" to implementationVersion, -+ "Implementation-Vendor" to date, // Paper -+ "Specification-Title" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Fork-friendly Rebranding -+ "Specification-Version" to project.version, -+ "Specification-Vendor" to rootProject.providers.gradleProperty("providerName").get(), // Purpur // Plazma - Fork-friendly Rebranding -+ "Brand-Id" to rootProject.providers.gradleProperty("brandKey").get(), // Purpur // Plazma - Fork-friendly Rebranding -+ "Brand-Name" to rootProject.providers.gradleProperty("brandName").get(), // Purpur // Plazma - Fork-friendly Rebranding -+ "Build-Number" to (build ?: ""), -+ "Build-Time" to Instant.now().toString(), -+ "Git-Branch" to gitBranch, // Paper -+ "Git-Commit" to gitHash, // Paper -+ "CraftBukkit-Package-Version" to paperweight.craftBukkitPackageVersion.get(), // Paper -+ ) -+ for (tld in setOf("net", "com", "org")) { -+ attributes("$tld/bukkit", "Sealed" to true) -+ } - } - } --} -- --// Paper start - compile tests with -parameters for better junit parameterized test names --tasks.compileTestJava { -- options.compilerArgs.add("-parameters") --} --// Paper end - --publishing { -- publications.create("maven") { -+ // Paper start - compile tests with -parameters for better junit parameterized test names -+ compileTestJava { -+ options.compilerArgs.add("-parameters") - } --} -+ // Paper end - --// Paper start --val scanJar = tasks.register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) { -- badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;") -- jarToScan.set(tasks.serverJar.flatMap { it.archiveFile }) -- classpath.from(configurations.compileClasspath) --} --tasks.check { -- dependsOn(scanJar) --} --// Paper end --// Paper start - use TCA for console improvements --tasks.serverJar { -- from(alsoShade.elements.map { -- it.map { f -> -- if (f.asFile.isFile) { -- zipTree(f.asFile) -- } else { -- f.asFile -+ // Paper start -+ val scanJar = register("scanJarForBadCalls", io.papermc.paperweight.tasks.ScanJarForBadCalls::class) { -+ badAnnotations.add("Lio/papermc/paper/annotation/DoNotUse;") -+ jarToScan.set(serverJar.flatMap { it.archiveFile }) -+ classpath.from(configurations.compileClasspath) -+ } -+ check { -+ dependsOn(scanJar) -+ } -+ // Paper end -+ -+ // Paper start - use TCA for console improvements -+ serverJar { -+ from(alsoShade.elements.map { -+ it.map { f -> -+ if (f.asFile.isFile) { -+ zipTree(f.asFile) -+ } else { -+ f.asFile -+ } - } -+ }) -+ } -+ // Paper end - use TCA for console improvements -+ -+ test { -+ exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class") -+ useJUnitPlatform() -+ } -+ -+ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatMap { it.elements } -+ .zip(configurations.vanillaServer.map { it.singleFile.absolutePath }) { runtime, vanilla -> -+ runtime.filterNot { it.asFile.absolutePath == vanilla } - } -- }) --} --// Paper end - use TCA for console improvements - --tasks.test { -- exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class") -- useJUnitPlatform() -+ registerRunTask("runServer") { -+ description = "Spin up a test server from the Mojang mapped server jar" -+ classpath(includeMappings.flatMap { it.outputJar }) -+ classpath(runtimeClasspathWithoutVanillaServer) -+ } -+ registerRunTask("runReobfServer") { -+ description = "Spin up a test server from the reobfJar output jar" -+ classpath(reobfJar.flatMap { it.outputJar }) -+ classpath(runtimeClasspathWithoutVanillaServer) -+ } -+ registerRunTask("runDevServer") { -+ description = "Spin up a test server without assembling a jar" -+ classpath(sourceSets.main.map { it.runtimeClasspath }) -+ jvmArgs("-DPaper.pushPaperAssetsRoot=true") -+ } -+ registerRunTask("runBundler") { -+ description = "Spin up a test server from the Mojang mapped bundler jar" -+ classpath(rootProject.tasks.named("createMojmapBundlerJar").flatMap { it.outputZip }) -+ mainClass.set(null as String?) -+ } -+ registerRunTask("runReobfBundler") { -+ description = "Spin up a test server from the reobf bundler jar" -+ classpath(rootProject.tasks.named("createReobfBundlerJar").flatMap { it.outputZip }) -+ mainClass.set(null as String?) -+ } -+ registerRunTask("runPaperclip") { -+ description = "Spin up a test server from the Mojang mapped Paperclip jar" -+ classpath(rootProject.tasks.named("createMojmapPaperclipJar").flatMap { it.outputZip }) -+ mainClass.set(null as String?) -+ } -+ registerRunTask("runReobfPaperclip") { -+ description = "Spin up a test server from the reobf Paperclip jar" -+ classpath(rootProject.tasks.named("createReobfPaperclipJar").flatMap { it.outputZip }) -+ mainClass.set(null as String?) -+ } - } -+// Plazma end - Cleanup buildscripts - - fun TaskContainer.registerRunTask( - name: String, -@@ -162,47 +203,3 @@ fun TaskContainer.registerRunTask( - - block(this) - } -- --val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatMap { it.elements } -- .zip(configurations.vanillaServer.map { it.singleFile.absolutePath }) { runtime, vanilla -> -- runtime.filterNot { it.asFile.absolutePath == vanilla } -- } -- --tasks.registerRunTask("runServer") { -- description = "Spin up a test server from the Mojang mapped server jar" -- classpath(tasks.includeMappings.flatMap { it.outputJar }) -- classpath(runtimeClasspathWithoutVanillaServer) --} -- --tasks.registerRunTask("runReobfServer") { -- description = "Spin up a test server from the reobfJar output jar" -- classpath(tasks.reobfJar.flatMap { it.outputJar }) -- classpath(runtimeClasspathWithoutVanillaServer) --} -- --tasks.registerRunTask("runDevServer") { -- description = "Spin up a test server without assembling a jar" -- classpath(sourceSets.main.map { it.runtimeClasspath }) -- jvmArgs("-DPaper.pushPaperAssetsRoot=true") --} -- --tasks.registerRunTask("runBundler") { -- description = "Spin up a test server from the Mojang mapped bundler jar" -- classpath(rootProject.tasks.named("createMojmapBundlerJar").flatMap { it.outputZip }) -- mainClass.set(null as String?) --} --tasks.registerRunTask("runReobfBundler") { -- description = "Spin up a test server from the reobf bundler jar" -- classpath(rootProject.tasks.named("createReobfBundlerJar").flatMap { it.outputZip }) -- mainClass.set(null as String?) --} --tasks.registerRunTask("runPaperclip") { -- description = "Spin up a test server from the Mojang mapped Paperclip jar" -- classpath(rootProject.tasks.named("createMojmapPaperclipJar").flatMap { it.outputZip }) -- mainClass.set(null as String?) --} --tasks.registerRunTask("runReobfPaperclip") { -- description = "Spin up a test server from the reobf Paperclip jar" -- classpath(rootProject.tasks.named("createReobfPaperclipJar").flatMap { it.outputZip }) -- mainClass.set(null as String?) --} diff --git a/patches/server/0006-Rebrand-Logo.patch b/patches/server/0005-Rebrand-Logo.patch similarity index 100% rename from patches/server/0006-Rebrand-Logo.patch rename to patches/server/0005-Rebrand-Logo.patch diff --git a/patches/server/0007-Plazma-Configurations.patch b/patches/server/0006-Plazma-Configurations.patch similarity index 99% rename from patches/server/0007-Plazma-Configurations.patch rename to patches/server/0006-Plazma-Configurations.patch index a5d101ef9..273733528 100644 --- a/patches/server/0007-Plazma-Configurations.patch +++ b/patches/server/0006-Plazma-Configurations.patch @@ -646,10 +646,10 @@ index b3d47d16fb9733ca5cc4f90051ee8694ff3545c5..5456d2ded6f6e75c48868147e5a2dde5 this.navigatingMobs = new ObjectOpenHashSet(); this.blockEvents = new ObjectLinkedOpenHashSet(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4f056ad78325187efddc0b7ca3b02eef372d20b6..6814e816f1d7e2e7eb7dcb469e94999194ae65be 100644 +index 6fab30d186d64d51f7dd9af00fccded4c388844c..df73867ee5682fb966b69dd85da61a6928d8dab3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -168,6 +168,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -169,6 +169,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return this.paperConfig; } // Paper end - add paper world config @@ -662,7 +662,7 @@ index 4f056ad78325187efddc0b7ca3b02eef372d20b6..6814e816f1d7e2e7eb7dcb469e949991 public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray public final org.purpurmc.purpur.PurpurWorldConfig purpurConfig; // Purpur -@@ -250,9 +256,28 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -251,9 +257,28 @@ public abstract class Level implements LevelAccessor, AutoCloseable { //protected final io.papermc.paper.util.math.ThreadUnsafeRandom randomTickRandom = new io.papermc.paper.util.math.ThreadUnsafeRandom(java.util.concurrent.ThreadLocalRandom.current().nextLong()); public net.minecraft.util.RandomSource getThreadUnsafeRandom() { return this.randomTickRandom; } // Pufferfish - move thread unsafe random initialization // Pufferfish - getter // Purpur - dont break ABI diff --git a/patches/server/0008-Setup-basic-configuration-sections.patch b/patches/server/0007-Setup-basic-configuration-sections.patch similarity index 100% rename from patches/server/0008-Setup-basic-configuration-sections.patch rename to patches/server/0007-Setup-basic-configuration-sections.patch diff --git a/patches/server/0009-Warn-on-startup.patch b/patches/server/0008-Warn-on-startup.patch similarity index 100% rename from patches/server/0009-Warn-on-startup.patch rename to patches/server/0008-Warn-on-startup.patch diff --git a/patches/server/0010-Port-SparklyPaper-patches.patch b/patches/server/0009-Port-SparklyPaper-patches.patch similarity index 99% rename from patches/server/0010-Port-SparklyPaper-patches.patch rename to patches/server/0009-Port-SparklyPaper-patches.patch index 5326e0e93..af232f48d 100644 --- a/patches/server/0010-Port-SparklyPaper-patches.patch +++ b/patches/server/0009-Port-SparklyPaper-patches.patch @@ -239,7 +239,7 @@ index 5eb7bcf492ee354ef775cd8d09c7ca2bdfeb7ce2..697cb18bce2f2470a0a2347ba6709e14 continue; } diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 78be6cea03f40edfa90b5d9df014d5cf22b81f61..c376997ea2b8f61c2dbd80b31d51ba731fd5ed4c 100644 +index e16dcb7f60bc3cf2cbef4674b23f12e1e5bd59d3..c3a4fcf600e72f9e95e9df673619ce37d0480cca 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -78,6 +78,7 @@ public class ServerEntity { @@ -383,10 +383,10 @@ index 608390ed36710a419de1542b80340dd3fcc7299c..043f068345ca3c50209c1c3cc1feb627 mapItemSavedData.tickCarriedBy(player, stack); } diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 6814e816f1d7e2e7eb7dcb469e94999194ae65be..e3a43b352b2be5dbeae1b9ba85fad711d2a3153d 100644 +index df73867ee5682fb966b69dd85da61a6928d8dab3..5712ab081e9534f60248caaceea44445ff855e30 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1338,6 +1338,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1339,6 +1339,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { boolean flag = this.tickRateManager().runsNormally(); int tilesThisCycle = 0; @@ -395,7 +395,7 @@ index 6814e816f1d7e2e7eb7dcb469e94999194ae65be..e3a43b352b2be5dbeae1b9ba85fad711 var toRemove = new it.unimi.dsi.fastutil.objects.ReferenceOpenHashSet(); // Paper - Fix MC-117075; use removeAll toRemove.add(null); // Paper - Fix MC-117075 for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters -@@ -1350,14 +1352,28 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1351,14 +1353,28 @@ public abstract class Level implements LevelAccessor, AutoCloseable { tilesThisCycle--; toRemove.add(tickingblockentity); // Paper - Fix MC-117075; use removeAll // Spigot end @@ -699,7 +699,7 @@ index 1aac95b03a9e2e37c24f2a30bcb259c1424e1c78..e7c0c36fd3455c0536e98259b46dbcc9 this.levelHeightAccessor = heightLimitView; this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()]; 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 56dd36a88f11aeac528e7be2998e52324c01fde1..e1853318350f9a10e8db106a7bc015307db0de6c 100644 +index ab4dd0c8b4b17ff1b54c06b72dc8b3caba430fe2..e026dc9ed15284f55cdd4bc99c0718aba6d2e8c6 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -75,6 +75,8 @@ public class LevelChunk extends ChunkAccess { diff --git a/patches/server/0011-Always-agree-EULA-on-development-mode.patch b/patches/server/0010-Always-agree-EULA-on-development-mode.patch similarity index 89% rename from patches/server/0011-Always-agree-EULA-on-development-mode.patch rename to patches/server/0010-Always-agree-EULA-on-development-mode.patch index dbf22f218..0ef0872c7 100644 --- a/patches/server/0011-Always-agree-EULA-on-development-mode.patch +++ b/patches/server/0010-Always-agree-EULA-on-development-mode.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Always agree EULA on development mode diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index ab19474f251e1cca9455559db15023a6254c3524..77af8360e51fde5094bb45eb2a9820fb85de15f2 100644 +index 57deffa2f3d2f0074512440e668c71afb38510d4..4275364ada20fe5b67998ca1128322966dfc55e8 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -178,6 +178,7 @@ public class Main { diff --git a/patches/server/0012-Add-more-metrics.patch b/patches/server/0011-Add-more-metrics.patch similarity index 98% rename from patches/server/0012-Add-more-metrics.patch rename to patches/server/0011-Add-more-metrics.patch index a1d65aa4e..06dfdf620 100644 --- a/patches/server/0012-Add-more-metrics.patch +++ b/patches/server/0011-Add-more-metrics.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add more metrics diff --git a/src/main/java/com/destroystokyo/paper/Metrics.java b/src/main/java/com/destroystokyo/paper/Metrics.java -index 5eefe30d47b055fd544caebfb77f6f5a12894fda..b52df693c32b86617ed3afefb4b24c91eab67273 100644 +index 81b204c03b3c9a997f00fd423daa963757cb0daf..67e299893b7e1a64ab2962d79c2434dad189eed5 100644 --- a/src/main/java/com/destroystokyo/paper/Metrics.java +++ b/src/main/java/com/destroystokyo/paper/Metrics.java @@ -636,38 +636,59 @@ public class Metrics { diff --git a/patches/server/0013-Optimize-default-configurations.patch b/patches/server/0012-Optimize-default-configurations.patch similarity index 99% rename from patches/server/0013-Optimize-default-configurations.patch rename to patches/server/0012-Optimize-default-configurations.patch index f4e365c37..359bcf487 100644 --- a/patches/server/0013-Optimize-default-configurations.patch +++ b/patches/server/0012-Optimize-default-configurations.patch @@ -337,7 +337,7 @@ index 24763d3d270c29c95e0b3e85111145234f660a62..80ddc627e02e3c749e6b074afa93d357 } diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 77af8360e51fde5094bb45eb2a9820fb85de15f2..699cbd3468c4123ff07251157d0fb6368078b6ca 100644 +index 4275364ada20fe5b67998ca1128322966dfc55e8..ab5607df7819bdc25d4856007122a6dce89857a9 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -163,7 +163,7 @@ public class Main { diff --git a/patches/server/0014-Add-an-option-to-apply-the-configuration-to-the-vani.patch b/patches/server/0013-Add-an-option-to-apply-the-configuration-to-the-vani.patch similarity index 100% rename from patches/server/0014-Add-an-option-to-apply-the-configuration-to-the-vani.patch rename to patches/server/0013-Add-an-option-to-apply-the-configuration-to-the-vani.patch diff --git a/patches/server/0015-Tweak-console-logging.patch b/patches/server/0014-Tweak-console-logging.patch similarity index 98% rename from patches/server/0015-Tweak-console-logging.patch rename to patches/server/0014-Tweak-console-logging.patch index 64b63645d..88490de40 100644 --- a/patches/server/0015-Tweak-console-logging.patch +++ b/patches/server/0014-Tweak-console-logging.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Tweak console logging diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 85bb69e2e8bf96cabf7e86f997dc32a354dcf839..6fd3cb6daac76d41ea9c2aaabf171f958b8cf922 100644 +index 3a2acbdcfb64dff5ecb686ba7ea405b488e6eca9..c48f42815314e2fb106b0dff5f38a9e5c3498632 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -193,16 +193,6 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface diff --git a/patches/server/0016-Add-missing-purpur-configuration-options.patch b/patches/server/0015-Add-missing-purpur-configuration-options.patch similarity index 98% rename from patches/server/0016-Add-missing-purpur-configuration-options.patch rename to patches/server/0015-Add-missing-purpur-configuration-options.patch index 1288b6e20..6cbcf2cb3 100644 --- a/patches/server/0016-Add-missing-purpur-configuration-options.patch +++ b/patches/server/0015-Add-missing-purpur-configuration-options.patch @@ -163,7 +163,7 @@ index 722e1fed4b333958e95a847b27cfc67d04f13263..16891921341f8967c9115f415f91ec37 @Override diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java -index b04f7ce0805453f6c737fa9dc11c4129ca64e934..9840678549e25c6da00aea222a585e7f01ec1e0e 100644 +index e0aec3b3e04d603dc208029554f981c6b9e6b43e..337702c8042d44d4be6be1341023d0779cfaa580 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java @@ -45,12 +45,12 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain @@ -181,7 +181,7 @@ index b04f7ce0805453f6c737fa9dc11c4129ca64e934..9840678549e25c6da00aea222a585e7f this.setPos(d0, d1, d2); this.xo = d0; this.yo = d1; -@@ -172,7 +172,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain +@@ -170,7 +170,7 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain @Override public int getContainerSize() { @@ -191,7 +191,7 @@ index b04f7ce0805453f6c737fa9dc11c4129ca64e934..9840678549e25c6da00aea222a585e7f @Override diff --git a/src/main/java/org/purpurmc/purpur/PurpurConfig.java b/src/main/java/org/purpurmc/purpur/PurpurConfig.java -index 69066fd1e82cefff44c7dbd565b19373768e2a62..42a8009d3bb07cd89e92b71f88ef46dd994bc6eb 100644 +index 0a8d1f2b33257a371abb97a3a88af1f89ee46e24..dace438eac55b33b9318dfd9f8706883bab64971 100644 --- a/src/main/java/org/purpurmc/purpur/PurpurConfig.java +++ b/src/main/java/org/purpurmc/purpur/PurpurConfig.java @@ -329,6 +329,7 @@ public class PurpurConfig { diff --git a/patches/server/0017-Completely-remove-Mojang-Profiler.patch b/patches/server/0016-Completely-remove-Mojang-Profiler.patch similarity index 99% rename from patches/server/0017-Completely-remove-Mojang-Profiler.patch rename to patches/server/0016-Completely-remove-Mojang-Profiler.patch index 16891fc41..6dea84d30 100644 --- a/patches/server/0017-Completely-remove-Mojang-Profiler.patch +++ b/patches/server/0016-Completely-remove-Mojang-Profiler.patch @@ -1211,7 +1211,7 @@ index 97c129f5949ca7cb7430e1cf56e881c00f129530..5c4d902a6febe8ffadecbbc64b50ecdc + */ // Plazma - Completely remove Mojang's Profiler } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index a2bae50c126208621909ada50cdddd625c8b1912..123378148773b6818e67f2d0d330f1ffd3b883b8 100644 +index 9245a9d38ae6985fee36ab0efea006c9e2b0632a..2f5250d3baba15e914290ce30f813ad63f6bd943 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -37,7 +37,7 @@ import net.minecraft.sounds.SoundEvent; @@ -1288,7 +1288,7 @@ index a31326e24cb68472c81cd781c5e3041772712862..03323be2a120c53ac5a3607f6154c99d Builder, RecipeHolder> builder = ImmutableMultimap.builder(); com.google.common.collect.ImmutableMap.Builder> com_google_common_collect_immutablemap_builder = ImmutableMap.builder(); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index e3a43b352b2be5dbeae1b9ba85fad711d2a3153d..f9bca29920af57029325153a17db184309b31a86 100644 +index 5712ab081e9534f60248caaceea44445ff855e30..0a0ab76144aa7d0970638924878f1eb130b2e3e3 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -35,7 +35,7 @@ import net.minecraft.sounds.SoundSource; @@ -1309,7 +1309,7 @@ index e3a43b352b2be5dbeae1b9ba85fad711d2a3153d..f9bca29920af57029325153a17db1843 public final boolean isClientSide; private final WorldBorder worldBorder; private final BiomeManager biomeManager; -@@ -262,7 +262,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -263,7 +263,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { ResourceKey resourcekey, RegistryAccess iregistrycustom, Holder holder, @@ -1318,7 +1318,7 @@ index e3a43b352b2be5dbeae1b9ba85fad711d2a3153d..f9bca29920af57029325153a17db1843 boolean flag, boolean flag1, long i, -@@ -291,7 +291,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -292,7 +292,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } // CraftBukkit end @@ -1327,7 +1327,7 @@ index e3a43b352b2be5dbeae1b9ba85fad711d2a3153d..f9bca29920af57029325153a17db1843 this.levelData = worlddatamutable; this.dimensionTypeRegistration = holder; final DimensionType dimensionmanager = (DimensionType) holder.value(); -@@ -1868,14 +1868,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1869,14 +1869,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return false; } @@ -1369,7 +1369,7 @@ index c5454b92ca2565461c799d7340160f9fb72c1b0f..760a4f4b15a02f9cbb7a368961286ae3 + */ // Plazma - Completely remove Mojang's Profiler } 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 e1853318350f9a10e8db106a7bc015307db0de6c..977d38a2be585ffad27843704a29eeaf50310518 100644 +index e026dc9ed15284f55cdd4bc99c0718aba6d2e8c6..a1b60280b25452efca4f77f079734c50d9eec983 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java @@ -26,7 +26,7 @@ import net.minecraft.network.FriendlyByteBuf; diff --git a/patches/server/0018-Add-option-to-change-nether-portal-size.patch b/patches/server/0017-Add-option-to-change-nether-portal-size.patch similarity index 100% rename from patches/server/0018-Add-option-to-change-nether-portal-size.patch rename to patches/server/0017-Add-option-to-change-nether-portal-size.patch diff --git a/patches/server/0019-Reduce-create-random-instance.patch b/patches/server/0018-Reduce-create-random-instance.patch similarity index 96% rename from patches/server/0019-Reduce-create-random-instance.patch rename to patches/server/0018-Reduce-create-random-instance.patch index 60046516a..6ecb46379 100644 --- a/patches/server/0019-Reduce-create-random-instance.patch +++ b/patches/server/0018-Reduce-create-random-instance.patch @@ -30,10 +30,10 @@ index b47a8a082170bcb630c4354be7c77a4cac71d105..7fe6b99e146e7374cd29534f1e89046e double d1 = (double) (center.y - maxRange); double d2 = (double) (center.x + maxRange); diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index a7ba658a4dc6eeb9d5bc854289c21b3bd21646b1..acd0e6fb55d7a4684ddd8bf2c940a789f0a105af 100644 +index 4a29e90ff2a0fe9c5be094400d79ab89e61c437d..582cdbb7e2f25cdc533721e45a89ae15a8b05b8a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -482,7 +482,7 @@ public class ServerPlayer extends Player { +@@ -483,7 +483,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -42,7 +42,7 @@ index a7ba658a4dc6eeb9d5bc854289c21b3bd21646b1..acd0e6fb55d7a4684ddd8bf2c940a789 for (int l1 = 0; l1 < i1; ++l1) { int i2 = (k1 + j1 * l1) % i1; -@@ -519,7 +519,7 @@ public class ServerPlayer extends Player { +@@ -520,7 +520,7 @@ public class ServerPlayer extends Player { long l = k * k; int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l; int j1 = this.getCoprime(i1); @@ -130,7 +130,7 @@ index 96e9fce5f9084737d2fcf4deb83305733b480179..43da8ea227b2b01d6975a3f4f209099d private int tickDelay; private int spawnDelay; diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java -index 35299affb699d745804a3b60cb78b9323f3e068e..75890635b357bc54a03ed00bcfb3e287f1eb2cff 100644 +index 882de08963c72614a3d26cd917916e42b7136042..9aa17706e442d2ea7ba898c867a1f8ba817084f1 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java @@ -87,7 +87,7 @@ public class FishingHook extends Projectile { @@ -191,7 +191,7 @@ index 133d994d9ac9d4f9527135ac0c77e5749917f8c3..9771279c913a5be86e516db74792fd04 this.hitPlayers = Maps.newHashMap(); this.level = world; diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index f9bca29920af57029325153a17db184309b31a86..16531bcbdfe80c7e3d553aa6fce576588e2e3b0e 100644 +index 0a0ab76144aa7d0970638924878f1eb130b2e3e3..03acb687a978f89384a2a1936b61e0d699ee719c 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -121,16 +121,16 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -209,7 +209,7 @@ index f9bca29920af57029325153a17db184309b31a86..16531bcbdfe80c7e3d553aa6fce57658 /** @deprecated */ @Deprecated - private final RandomSource threadSafeRandom = RandomSource.createThreadSafe(); -+ private final RandomSource threadSafeRandom = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? random : RandomSource.createThreadSafe(); // Plazma - Reduce create random instace ++ private final RandomSource private final RandomSource threadSafeRandom = org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.ignoreThreadSafeRandom ? random : RandomSource.createThreadSafe(); // Plazma - Reduce create random instace private final Holder dimensionTypeRegistration; public final WritableLevelData levelData; // private final Supplier profiler; // Plazma - Completely remove Mojang's Profiler @@ -275,7 +275,7 @@ index 18a1b4325cac81b040596071dab99ef9bf6f3142..ab492b184a4ecdefc423823fc72abd80 this.level.getChunkSource().chunkMap.waitForLightBeforeSending(new ChunkPos(this.portalLocation), i); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java -index 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb814b56f6bc 100644 +index 95e35c223f2ad9b6de6749544abd68de71e4f1ab..492e0c1d00e8098d9a974f46c087a404ec67764e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java @@ -14,11 +14,12 @@ import org.bukkit.inventory.meta.FireworkMeta; @@ -290,7 +290,7 @@ index 1309fabd357eb9b8f90f882ec7ff3de9e60f187d..d300668899c3382a42e6a25dd084fb81 super(server, entity); + this.random = this.getHandle().level().plazmaConfig().misc.reduceRandom ? this.getHandle().level().getRandom() : net.minecraft.util.RandomSource.create(); // Plazma - Reduce create random instance - // Paper start - Expose firework item directly + // Paper start - Expose firework item directly // ItemStack item = this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM); diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java index e725f6e8205976a7b137aefb98b874cf4ae14893..dad5379066140b1eadab0a283cc7d8c019d8f4b6 100644 diff --git a/patches/server/0020-Apply-various-optimizations.patch b/patches/server/0019-Apply-various-optimizations.patch similarity index 87% rename from patches/server/0020-Apply-various-optimizations.patch rename to patches/server/0019-Apply-various-optimizations.patch index f37eacdfe..6003fc069 100644 --- a/patches/server/0020-Apply-various-optimizations.patch +++ b/patches/server/0019-Apply-various-optimizations.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Apply various optimizations Akarin - Swaps the predicate order of collision diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 1a5aec1612947bbc1df78c0eeda9b98aa63cec94..62b8afa8a922db58396fb314b54ce6f51778093c 100644 +index c9b3577a3992c11f6c299945362ac9be6c0c96e1..49717623c387b935592bdb4f19b36ee393ba51cb 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2210,8 +2210,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2209,8 +2209,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess public void playerTouch(Player player) {} public void push(Entity entity) { @@ -21,7 +21,7 @@ index 1a5aec1612947bbc1df78c0eeda9b98aa63cec94..62b8afa8a922db58396fb314b54ce6f5 if (this.level.paperConfig().collisions.onlyPlayersCollide && !(entity instanceof ServerPlayer || this instanceof ServerPlayer)) return; // Paper - Collision option for requiring a player participant double d0 = entity.getX() - this.getX(); double d1 = entity.getZ() - this.getZ(); -@@ -2239,8 +2240,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2238,8 +2239,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess entity.push(d0, 0.0D, d1); } } diff --git a/patches/server/0022-Do-not-load-chunks-to-spawn-phantom.patch b/patches/server/0020-Do-not-load-chunks-to-spawn-phantom.patch similarity index 100% rename from patches/server/0022-Do-not-load-chunks-to-spawn-phantom.patch rename to patches/server/0020-Do-not-load-chunks-to-spawn-phantom.patch diff --git a/patches/server/0023-Add-option-to-disable-moved-to-quickly-check-for-spe.patch b/patches/server/0021-Add-option-to-disable-moved-to-quickly-check-for-spe.patch similarity index 90% rename from patches/server/0023-Add-option-to-disable-moved-to-quickly-check-for-spe.patch rename to patches/server/0021-Add-option-to-disable-moved-to-quickly-check-for-spe.patch index 710c0e1c4..cf478a87f 100644 --- a/patches/server/0023-Add-option-to-disable-moved-to-quickly-check-for-spe.patch +++ b/patches/server/0021-Add-option-to-disable-moved-to-quickly-check-for-spe.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add option to disable moved to quickly check for specific diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 87341fb1546bf01a8c14e687e841681b112ba23b..ffc96208421ed96e0a4fa99618ff2b31185b50d1 100644 +index 972d8975d1bc04eb6c0c05f9ca8044f699c504a8..d4a78c02df4badf3f6ac45e6b1780d731e35cc87 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1469,6 +1469,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -18,7 +18,7 @@ index 87341fb1546bf01a8c14e687e841681b112ba23b..ffc96208421ed96e0a4fa99618ff2b31 float f2 = flag ? 300.0F : 100.0F; diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index ce327358e12388f123ee485948f87bc132243e5e..e8e8c2d55b934b3043c1f83092b63dee1c5fcc4e 100644 +index dad5379066140b1eadab0a283cc7d8c019d8f4b6..b6c5fc90654a9d89d4c70948124be6ae66c86cdf 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java @@ -27,6 +27,7 @@ public class GlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0021-Do-not-refresh-LootTable-for-non-player-interaction.patch b/patches/server/0021-Do-not-refresh-LootTable-for-non-player-interaction.patch deleted file mode 100644 index af0281f3e..000000000 --- a/patches/server/0021-Do-not-refresh-LootTable-for-non-player-interaction.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AlphaKR93 -Date: Sun, 5 Nov 2023 12:03:06 +0900 -Subject: [PATCH] Do not refresh LootTable for non player interaction - - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -index 5682039a18de20bacdac804db8da47953b22d653..1cdfbe7602041099eedc81b17fe94a457574ba03 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -@@ -74,6 +74,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc - - @Override - public void unpackLootTable(@org.jetbrains.annotations.Nullable final Player player) { -+ if (player == null && org.plazmamc.plazma.configurations.GlobalConfiguration.get().misc.refreshLootTableForNonPlayerInteraction) return; // Plazma - Do not refresh LootTable for non player interaction - // Copied from super with changes, always check the original method - net.minecraft.world.level.Level level = this.getLevel(); - BlockPos blockPos = this.getBlockPos(); -diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index dad5379066140b1eadab0a283cc7d8c019d8f4b6..ce327358e12388f123ee485948f87bc132243e5e 100644 ---- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -+++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -@@ -67,6 +67,7 @@ public class GlobalConfiguration extends ConfigurationPart { - - public boolean reduceRandom = OPTIMIZE; - public boolean ignoreThreadSafeRandom = false; -+ public boolean refreshLootTableForNonPlayerInteraction = !OPTIMIZE; - - } - diff --git a/patches/server/0024-Configurable-cave-lava-sea-level.patch b/patches/server/0022-Configurable-cave-lava-sea-level.patch similarity index 97% rename from patches/server/0024-Configurable-cave-lava-sea-level.patch rename to patches/server/0022-Configurable-cave-lava-sea-level.patch index d7a2d31f0..7cb52572e 100644 --- a/patches/server/0024-Configurable-cave-lava-sea-level.patch +++ b/patches/server/0022-Configurable-cave-lava-sea-level.patch @@ -33,7 +33,7 @@ index 8ce870a5341a61fbbaf42021ef7f7f615a6a3e09..6650f74b01285c1dba8243ca11dbde06 @Override diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index e8e8c2d55b934b3043c1f83092b63dee1c5fcc4e..0bd660fba6a0d4d7812e4c05d06e7070458743ea 100644 +index b6c5fc90654a9d89d4c70948124be6ae66c86cdf..ae6b4ee0add2de0b7568424abeab1bd441653bcb 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java @@ -35,6 +35,24 @@ public class GlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0025-Ignore-useless-entity-packets.patch b/patches/server/0023-Ignore-useless-entity-packets.patch similarity index 96% rename from patches/server/0025-Ignore-useless-entity-packets.patch rename to patches/server/0023-Ignore-useless-entity-packets.patch index d607077ba..4eb65b3bb 100644 --- a/patches/server/0025-Ignore-useless-entity-packets.patch +++ b/patches/server/0023-Ignore-useless-entity-packets.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Ignore useless entity packets - PurpurMC/Purpur diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index c376997ea2b8f61c2dbd80b31d51ba731fd5ed4c..6f19b5b67c99becbc1cb720274d41d15c7723c31 100644 +index c3a4fcf600e72f9e95e9df673619ce37d0480cca..2b4d3db901784a82e1ed91520a5e3d1fb8ca6b3e 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -214,6 +214,8 @@ public class ServerEntity { diff --git a/patches/server/0026-Configurable-entity-sensor-tick.patch b/patches/server/0024-Configurable-entity-sensor-tick.patch similarity index 95% rename from patches/server/0026-Configurable-entity-sensor-tick.patch rename to patches/server/0024-Configurable-entity-sensor-tick.patch index a51e109e5..2005777cb 100644 --- a/patches/server/0026-Configurable-entity-sensor-tick.patch +++ b/patches/server/0024-Configurable-entity-sensor-tick.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable entity sensor tick diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 9e9199b83fce2c9c8f03f4116c14a331279a234a..e691c4dc89bbf841730813fbd8dc21208482a59c 100644 +index 2f5250d3baba15e914290ce30f813ad63f6bd943..8b9d790351cd416e5d6051e9ad27d66a7097f558 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java @@ -997,10 +997,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti diff --git a/patches/server/0027-Variable-entity-wakeup-duration.patch b/patches/server/0025-Variable-entity-wakeup-duration.patch similarity index 100% rename from patches/server/0027-Variable-entity-wakeup-duration.patch rename to patches/server/0025-Variable-entity-wakeup-duration.patch diff --git a/patches/server/0028-Optimise-state-lookup-more.patch b/patches/server/0026-Optimise-state-lookup-more.patch similarity index 100% rename from patches/server/0028-Optimise-state-lookup-more.patch rename to patches/server/0026-Optimise-state-lookup-more.patch diff --git a/patches/server/0029-Suppress-errors-from-dirty-attributes.patch b/patches/server/0027-Suppress-errors-from-dirty-attributes.patch similarity index 95% rename from patches/server/0029-Suppress-errors-from-dirty-attributes.patch rename to patches/server/0027-Suppress-errors-from-dirty-attributes.patch index 7e2bb94ed..95ee7aeef 100644 --- a/patches/server/0029-Suppress-errors-from-dirty-attributes.patch +++ b/patches/server/0027-Suppress-errors-from-dirty-attributes.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Suppress errors from dirty attributes diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 6f19b5b67c99becbc1cb720274d41d15c7723c31..4ef3d8541c93567e3a9b712c0d4dd5f6cfeb2990 100644 +index 2b4d3db901784a82e1ed91520a5e3d1fb8ca6b3e..b66a56ea65cb323953278f80d210473f9f571722 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -415,7 +415,8 @@ public class ServerEntity { diff --git a/patches/server/0030-Skip-event-if-no-listeners.patch b/patches/server/0028-Skip-event-if-no-listeners.patch similarity index 100% rename from patches/server/0030-Skip-event-if-no-listeners.patch rename to patches/server/0028-Skip-event-if-no-listeners.patch diff --git a/patches/server/0031-Add-entity-spawn-deadlock-timer.patch b/patches/server/0029-Add-entity-spawn-deadlock-timer.patch similarity index 100% rename from patches/server/0031-Add-entity-spawn-deadlock-timer.patch rename to patches/server/0029-Add-entity-spawn-deadlock-timer.patch diff --git a/patches/server/0032-Lithium-HashedList.patch b/patches/server/0030-Lithium-HashedList.patch similarity index 100% rename from patches/server/0032-Lithium-HashedList.patch rename to patches/server/0030-Lithium-HashedList.patch diff --git a/patches/server/0033-Improve-SwingTime-ticking.patch b/patches/server/0031-Improve-SwingTime-ticking.patch similarity index 88% rename from patches/server/0033-Improve-SwingTime-ticking.patch rename to patches/server/0031-Improve-SwingTime-ticking.patch index 696bb91fa..f55bd8593 100644 --- a/patches/server/0033-Improve-SwingTime-ticking.patch +++ b/patches/server/0031-Improve-SwingTime-ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Improve SwingTime ticking diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 12841498369db7020bb844040bc5464745312082..decf23f5320d728088085c86009eb502e6af072b 100644 +index 7894a41a212c31f96c758608f4f8fc2b50e63661..43673b4edeae610196950c088d916e87b008647e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2680,6 +2680,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0034-Save-Json-list-asynchronously.patch b/patches/server/0032-Save-Json-list-asynchronously.patch similarity index 100% rename from patches/server/0034-Save-Json-list-asynchronously.patch rename to patches/server/0032-Save-Json-list-asynchronously.patch diff --git a/patches/server/0035-Add-more-MSPT.patch b/patches/server/0033-Add-more-MSPT.patch similarity index 100% rename from patches/server/0035-Add-more-MSPT.patch rename to patches/server/0033-Add-more-MSPT.patch diff --git a/patches/server/0036-Process-pathfinding-asynchronously.patch b/patches/server/0034-Process-pathfinding-asynchronously.patch similarity index 99% rename from patches/server/0036-Process-pathfinding-asynchronously.patch rename to patches/server/0034-Process-pathfinding-asynchronously.patch index 4c7e00ae6..2339233a5 100644 --- a/patches/server/0036-Process-pathfinding-asynchronously.patch +++ b/patches/server/0034-Process-pathfinding-asynchronously.patch @@ -1285,7 +1285,7 @@ index 1c83926923f50fb4da1a83dc91614c20a831555f..aec2d0f9a957be65d031957dbff874d8 Command.broadcastCommandMessage(sender, text("Successfully reloaded Plazma configuration files.", NamedTextColor.GREEN)); diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index 0bd660fba6a0d4d7812e4c05d06e7070458743ea..7e3e9ef809505b2d46b1ac90490c9aa130aa3afe 100644 +index ae6b4ee0add2de0b7568424abeab1bd441653bcb..d0a1b97bacf9978b4955b1c2c4502c2c1312f1d4 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java @@ -62,6 +62,26 @@ public class GlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0037-Use-Akair-s-flag-when-running-the-test-server-with-g.patch b/patches/server/0035-Use-Akair-s-flag-when-running-the-test-server-with-g.patch similarity index 90% rename from patches/server/0037-Use-Akair-s-flag-when-running-the-test-server-with-g.patch rename to patches/server/0035-Use-Akair-s-flag-when-running-the-test-server-with-g.patch index d14c13675..173a691f4 100644 --- a/patches/server/0037-Use-Akair-s-flag-when-running-the-test-server-with-g.patch +++ b/patches/server/0035-Use-Akair-s-flag-when-running-the-test-server-with-g.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use Akair's flag when running the test server with gradle diff --git a/build.gradle.kts b/build.gradle.kts -index b95eda82341edf50f74da6760b42c47a7365e320..b310a4764cba6688d3ca28f8b2a8919af8e1494b 100644 +index afa4877ade6cf8b615ba70c1cf7a8c92040e924a..17463aa6bc8792df47676d0f8b031f05c58fae76 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -178,7 +178,7 @@ fun TaskContainer.registerRunTask( +@@ -137,7 +137,7 @@ fun TaskContainer.registerRunTask( languageVersion.set(JavaLanguageVersion.of(21)) vendor.set(JvmVendorSpec.JETBRAINS) }) diff --git a/patches/server/0038-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch b/patches/server/0036-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch similarity index 100% rename from patches/server/0038-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch rename to patches/server/0036-Use-Plazma-logo-instead-if-server-favicon-doesn-t-ex.patch diff --git a/patches/server/0039-Implement-FreedomChat.patch b/patches/server/0037-Implement-FreedomChat.patch similarity index 98% rename from patches/server/0039-Implement-FreedomChat.patch rename to patches/server/0037-Implement-FreedomChat.patch index 81acfa6bb..4b4bc4180 100644 --- a/patches/server/0039-Implement-FreedomChat.patch +++ b/patches/server/0037-Implement-FreedomChat.patch @@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 0a30e9873e5f218589dfd90f04edc863e645989a..b6c9e81249bba59856d96ff71610b687fd9c4396 100644 +index 95105a7ffaa71f8eaa00c617fc112872aa2e2e78..dc24e0d9d7811de89ff94c49365c537d7211aa7d 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -708,6 +708,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -52,7 +52,7 @@ index c36ebab552c480d34e7fd48a45f0a320a97b9677..fdfe8f5bc5ad0e5f5ded41d87756a586 player.loadGameTypes((CompoundTag) optional.orElse(null)); // CraftBukkit - decompile error ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, clientData); diff --git a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java -index b18dfe9223b75d8a36b4b3a934625914f9a6a553..19b198fb1d0ffee28a2cfd516cb31204fd1a310c 100644 +index d0a1b97bacf9978b4955b1c2c4502c2c1312f1d4..c2caf205fa65382016b8340ff536c583b8234621 100644 --- a/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java +++ b/src/main/java/org/plazmamc/plazma/configurations/GlobalConfiguration.java @@ -29,6 +29,15 @@ public class GlobalConfiguration extends ConfigurationPart { diff --git a/patches/server/0040-Add-some-missing-Pufferfish-configurations.patch b/patches/server/0038-Add-some-missing-Pufferfish-configurations.patch similarity index 100% rename from patches/server/0040-Add-some-missing-Pufferfish-configurations.patch rename to patches/server/0038-Add-some-missing-Pufferfish-configurations.patch diff --git a/patches/server/0041-Improve-biome-temperature-cache.patch b/patches/server/0039-Improve-biome-temperature-cache.patch similarity index 100% rename from patches/server/0041-Improve-biome-temperature-cache.patch rename to patches/server/0039-Improve-biome-temperature-cache.patch