diff --git a/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch b/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch index 2d2474e1..c05a17a7 100644 --- a/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch +++ b/leaf-server/minecraft-patches/features/0099-Fix-Pufferfish-and-Purpur-patches.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Pufferfish and Purpur patches diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 271233087ad8a0ef8e90e1d518907e166f8235a2..ecf1e794c78962440da02aadfbe78d9782df2cf0 100644 +index b72834526c4ebbe24c975aa4b21f55f1986a773e..1109b12657e4f098b18e2a3cea18ddeed67bc224 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -276,7 +276,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop pluginsBlockingSleep = new java.util.HashSet<>(); // Paper - API to allow/disallow tick sleeping public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation @@ -26,7 +26,7 @@ index 271233087ad8a0ef8e90e1d518907e166f8235a2..ecf1e794c78962440da02aadfbe78d97 public boolean lagging = false; // Purpur - Lagging threshold protected boolean upnp = false; // Purpur - UPnP Port Forwarding -@@ -1239,9 +1239,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop byteAllowed) { @@ -78,10 +78,10 @@ index 35ca166964e8436154891708f69ac010491b64aa..586c00610fdba178f27391820d623c3a this.disconnectAsync(Component.literal("Book too large!"), org.bukkit.event.player.PlayerKickEvent.Cause.ILLEGAL_ACTION); // Paper - kick event cause // Paper - add proper async disconnect return; diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index d8c83a449a1f33031aa671f3bbe366a504172a1e..d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa 100644 +index 46938755cfd291bb2e4711a0651eacd7a4721aa0..305181410e025d857608c866592bcc44e3654f31 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -526,23 +526,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -543,23 +543,36 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Purpur end - Add canSaveToDisk to Entity @@ -128,10 +128,10 @@ index d8c83a449a1f33031aa671f3bbe366a504172a1e..d4a7cabf25b3ba2b085c68a3a7ed73a0 public Entity(EntityType entityType, Level level) { this.type = entityType; diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index cd8c764f9aa2321c6e157abe958d89868a9f7bd1..ed15b5f29658d799a36dcbd196a8fcb107be4bda 100644 +index d7d6e0543dc26694891e4a9049b8162caadbf5e6..d59caf13e9066f2171c360e07a26122a540380a0 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1024,13 +1024,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1049,13 +1049,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin // Gale start - Petal - reduce skull ItemStack lookups for reduced visibility EntityType type = lookingEntity.getType(); // Purpur start - Mob head visibility percent @@ -150,10 +150,10 @@ index cd8c764f9aa2321c6e157abe958d89868a9f7bd1..ed15b5f29658d799a36dcbd196a8fcb1 } // Purpur end - Mob head visibility percent diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index 6a94f42c8e048985b94db64fa0405e12824a8a0f..fbcf26c0bfb9f496c99bd5a2ba988be06162cd52 100644 +index 6d8e7d23640707ba0d771174f65e58df75243f77..c5f4b878aa5d736d987982c94fbf557c0f267bbf 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -1505,10 +1505,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -1531,10 +1531,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab protected void playAttackSound() { } @@ -195,10 +195,10 @@ index 60ec389615cfcad388ed37b8d3ee04e87db36755..34fe1d3bd6603225f84ab18794bbb118 BlockPos blockPos = entity.blockPosition(); List list = Lists.newArrayList(); diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index 441287e74243a413c97a98b7898bab7833ac6458..18107d9be4d9ba816852ee4595a5349867834bef 100644 +index 7127d8e5fff81be017f0aa04606cb8404ad7b2fd..a25976d6f0dec86b88017cd5f86f3b51c8d7444b 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -283,8 +283,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -268,8 +268,7 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -209,10 +209,10 @@ index 441287e74243a413c97a98b7898bab7833ac6458..18107d9be4d9ba816852ee4595a53498 AllayAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -index de207d747026453fabe2e6e725d2aa8504fbc9a1..524a7c31708a03f7a9dae75731caa8a450a6488d 100644 +index 02db38fa315ecb9d5bdba74848012710106b662e..2cdf2fb60d4d3642f0870944be9bd5abafa9e817 100644 --- a/net/minecraft/world/entity/animal/axolotl/Axolotl.java +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java -@@ -372,8 +372,7 @@ public class Axolotl extends Animal implements Bucketable { +@@ -374,8 +374,7 @@ public class Axolotl extends Animal implements Bucketable { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -223,10 +223,10 @@ index de207d747026453fabe2e6e725d2aa8504fbc9a1..524a7c31708a03f7a9dae75731caa8a4 AxolotlAi.updateActivity(this); if (!this.isNoAi()) { diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 89fa6a785ff73b30effd58dde4fbcbf99fdad168..71bae5f5ed284fed30262872771f85de97383d6d 100644 +index c4db078db0b7bb2bd8f6757a8bd13d60a7a4fa14..a7e9179c287671a689cb5ce668b5a33896da87a4 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -259,8 +259,7 @@ public class Frog extends Animal { +@@ -260,8 +260,7 @@ public class Frog extends Animal { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -237,10 +237,10 @@ index 89fa6a785ff73b30effd58dde4fbcbf99fdad168..71bae5f5ed284fed30262872771f85de FrogAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index a445bbe84d919ffadd8f3f0006b12140cd8060fd..7a3bfa91ffc5c7c6b04eef7b1b1d3c04c5a6d856 100644 +index a3858465569c40fcfc7c8c4c4735335ac83cb078..5abdf4253f1d0a6f35d8e05f7a0a2b4100083f76 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -134,8 +134,7 @@ public class Tadpole extends AbstractFish { +@@ -136,8 +136,7 @@ public class Tadpole extends AbstractFish { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -251,10 +251,10 @@ index a445bbe84d919ffadd8f3f0006b12140cd8060fd..7a3bfa91ffc5c7c6b04eef7b1b1d3c04 TadpoleAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/goat/Goat.java b/net/minecraft/world/entity/animal/goat/Goat.java -index 40ba2e6dc6b1efbd17dba582561c133f6b41df25..39d4da47dcd7bbb33ad907b428dc0f65eaa23a82 100644 +index 11b020704a673c69bd2d4ab6313ea32e8e97cc23..c608c71eb601c169f543823c5c342b8928b9cf50 100644 --- a/net/minecraft/world/entity/animal/goat/Goat.java +++ b/net/minecraft/world/entity/animal/goat/Goat.java -@@ -226,8 +226,7 @@ public class Goat extends Animal { +@@ -227,8 +227,7 @@ public class Goat extends Animal { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -265,10 +265,10 @@ index 40ba2e6dc6b1efbd17dba582561c133f6b41df25..39d4da47dcd7bbb33ad907b428dc0f65 GoatAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index 584955d151e95727406bc68d6a6f15a33c0f920c..865a83fc73d79893e9bdedad37a6e3986d15fc2b 100644 +index 3c126b1610718a407c16775a935b295ecbaab533..8c9f240badf5a678ee4e1815e010a204f8704f4e 100644 --- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -206,8 +206,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -207,8 +207,7 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { private int behaviorTick; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -279,10 +279,10 @@ index 584955d151e95727406bc68d6a6f15a33c0f920c..865a83fc73d79893e9bdedad37a6e398 HoglinAi.updateActivity(this); if (this.isConverting()) { diff --git a/net/minecraft/world/entity/monster/piglin/Piglin.java b/net/minecraft/world/entity/monster/piglin/Piglin.java -index 0afdfdc07764a26316c171c2a6722caf786875f2..732d44372cf226ca9d008ebc26d1838237ec96d6 100644 +index fb58af763cf75c80703360a5c668168775b1458c..e442784741f1d0b4892284b6811343f954b50182 100644 --- a/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -357,8 +357,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -358,8 +358,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento private int behaviorTick; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -293,10 +293,10 @@ index 0afdfdc07764a26316c171c2a6722caf786875f2..732d44372cf226ca9d008ebc26d18382 PiglinAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/projectile/Projectile.java b/net/minecraft/world/entity/projectile/Projectile.java -index 9f1c07be83999b7bafdee9238e8bad8c646d42f1..554e679a756dc1bf529053594231a958717f3573 100644 +index ef960ee83adbb5e3ebfa44cd2457b23718045f61..e53c18efb573dea39a3d45f3cdb827d73b901ab6 100644 --- a/net/minecraft/world/entity/projectile/Projectile.java +++ b/net/minecraft/world/entity/projectile/Projectile.java -@@ -85,7 +85,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -82,7 +82,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { if (maxChunkLoadsPerProjectile >= 0 && this.chunksLoadedByProjectile >= maxChunkLoadsPerProjectile) { if (maxProjectileChunkLoadsConfig.perProjectile.removeFromWorldAfterReachLimit) { @@ -306,10 +306,10 @@ index 9f1c07be83999b7bafdee9238e8bad8c646d42f1..554e679a756dc1bf529053594231a958 this.setDeltaMovement(0, this.getDeltaMovement().y, 0); } diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java -index 31cc4e6e68a9743aaaeb296cb31e64526d3f1f73..cadfbb7310fce33eda24d69c39fda5689c7fb882 100644 +index 611847bd7576bb77fdfb734ddb2e3412f3831041..7137c05ac03580143c4a4d74881231800bd552f8 100644 --- a/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/org/purpurmc/purpur/PurpurWorldConfig.java -@@ -2435,6 +2435,13 @@ public class PurpurWorldConfig { +@@ -2458,6 +2458,13 @@ public class PurpurWorldConfig { piglinMobGriefingOverride = getBooleanOrDefault("mobs.piglin.mob-griefing-override", piglinMobGriefingOverride); piglinTakeDamageFromWater = getBoolean("mobs.piglin.takes-damage-from-water", piglinTakeDamageFromWater); piglinPortalSpawnModifier = getInt("mobs.piglin.portal-spawn-modifier", piglinPortalSpawnModifier); diff --git a/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch b/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch index dafe82e0..c6a7cb2a 100644 --- a/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch +++ b/leaf-server/minecraft-patches/features/0100-Purpur-Configurable-server-mod-name.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/PurpurMC/Purpur diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index ecf1e794c78962440da02aadfbe78d9782df2cf0..cf958bb871137dc88a8c36be867f2192acba2687 100644 +index 1109b12657e4f098b18e2a3cea18ddeed67bc224..8da49dd5d56128df4fd3c3c5a4731be2eb5eb094 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1838,7 +1838,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 1.18.x that updated by Mojang. By removing this check, it gives ability for hackers to use some modules of hack clients. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 586c00610fdba178f27391820d623c3a5254529f..44e96e867d8a4403a7c88f772d2aa60cbe9f516b 100644 +index 1aaa94a2800687faa4d86698a4e1ad72bdaf15f3..d1245f54d55e4a3c406feef3cc2d5e25bb6346ce 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2075,8 +2075,13 @@ public class ServerGamePacketListenerImpl +@@ -2108,8 +2108,13 @@ public class ServerGamePacketListenerImpl BlockPos blockPos = hitResult.getBlockPos(); if (this.player.canInteractWithBlock(blockPos, 1.0)) { Vec3 vec3 = location.subtract(Vec3.atCenterOf(blockPos)); diff --git a/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch b/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch index 4fbcb65f..c8c31ce3 100644 --- a/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch +++ b/leaf-server/minecraft-patches/features/0105-Remove-change-non-editable-sign-warning.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove change non-editable sign warning diff --git a/net/minecraft/world/level/block/entity/SignBlockEntity.java b/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 4c5de8783b2fc87a442e194e0069ce9cd5b5fd6c..f150c1e963dc5e7d968e1656f6f1884fe4762202 100644 +index 2e0b2b55031343e32b4972c0f0017e950d56652d..3b73a8af99e398642e9603593369420c4ca8eb77 100644 --- a/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -140,7 +140,7 @@ public class SignBlockEntity extends BlockEntity { +@@ -137,7 +137,7 @@ public class SignBlockEntity extends BlockEntity { this.setAllowedPlayerEditor(null); this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); } else { diff --git a/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch b/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch index b066fd11..2aac2cf0 100644 --- a/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch +++ b/leaf-server/minecraft-patches/features/0106-KeYi-Add-an-option-for-spigot-item-merging-mechanism.patch @@ -7,10 +7,10 @@ Original license: MIT Original project: https://github.com/KeYiMC/KeYi diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 883a053d025e74f73556a0affa2340e42365df59..8aab412c8e70b6f9d8e05a26cefac330dd7a2ea1 100644 +index 20f4c879e46fdd0ed0515dbbb91f6411d5c76a51..93303c5499e621c8dd2152e4faccf08c4ba119f3 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -322,7 +322,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -312,7 +312,7 @@ public class ItemEntity extends Entity implements TraceableEntity { ItemStack item = this.getItem(); ItemStack item1 = itemEntity.getItem(); if (Objects.equals(this.target, itemEntity.target) && areMergable(item, item1)) { diff --git a/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch b/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch index 47b881eb..e9a42a6f 100644 --- a/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch +++ b/leaf-server/minecraft-patches/features/0110-Slice-Smooth-Teleports.patch @@ -9,10 +9,10 @@ Original project: https://github.com/Cryptite/Slice Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 834829427f3388c6cd94b5ceadc18b234c579f26..5775a39220bb5f48e2ce01c51402ac8b194a8d9d 100644 +index 6d453bdf4f265c23e7e349d07d766553ef0a4fad..737cba1729e980f58afa5e5aa83908c64c3a1a45 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -423,6 +423,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -434,6 +434,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc private boolean tpsBar = false; // Purpur - Implement TPSBar private boolean compassBar = false; // Purpur - Add compass command private boolean ramBar = false; // Purpur - Implement rambar commands @@ -21,12 +21,12 @@ index 834829427f3388c6cd94b5ceadc18b234c579f26..5775a39220bb5f48e2ce01c51402ac8b // Paper start - rewrite chunk system private ca.spottedleaf.moonrise.patches.chunk_system.player.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index bfcc40c09f80b5405cc414969693c195769bcb98..d7d68dbdd39ff6e61531d2edeafdd923f0573c89 100644 +index 7fdcdc311e5a3236df0c7d479d0e206e2fa15dd0..2f00e7899c36a2a34f810fc6083846eb3883131f 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -798,11 +798,11 @@ public abstract class PlayerList { +@@ -794,11 +794,11 @@ public abstract class PlayerList { byte b = (byte)(keepInventory ? 1 : 0); - ServerLevel serverLevel = serverPlayer.serverLevel(); + ServerLevel serverLevel = serverPlayer.level(); LevelData levelData = serverLevel.getLevelData(); - serverPlayer.connection.send(new ClientboundRespawnPacket(serverPlayer.createCommonSpawnInfo(serverLevel), b)); + if (!serverPlayer.smoothWorldTeleport || !isSameLogicalHeight((ServerLevel) fromWorld, level)) serverPlayer.connection.send(new ClientboundRespawnPacket(serverPlayer.createCommonSpawnInfo(serverLevel), b)); // Leaf - Slice @@ -38,7 +38,7 @@ index bfcc40c09f80b5405cc414969693c195769bcb98..d7d68dbdd39ff6e61531d2edeafdd923 serverPlayer.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getSharedSpawnPos(), level.getSharedSpawnAngle())); serverPlayer.connection.send(new ClientboundChangeDifficultyPacket(levelData.getDifficulty(), levelData.isDifficultyLocked())); serverPlayer.connection -@@ -890,6 +890,8 @@ public abstract class PlayerList { +@@ -886,6 +886,8 @@ public abstract class PlayerList { return serverPlayer; } diff --git a/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch b/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch index ee17feb5..b400d161 100644 --- a/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch +++ b/leaf-server/minecraft-patches/features/0112-Leaves-Protocol-Core.patch @@ -59,10 +59,10 @@ index 62b9d9486c15a1ec6527f786df4e9fc483390bcb..5384bbc6bb3dbe5481f9d8cb10282551 int i = buffer.readableBytes(); if (i >= 0 && i <= maxSize) { diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index cf958bb871137dc88a8c36be867f2192acba2687..2c50bde56da7174dcea828feedecb92c98347a45 100644 +index 8da49dd5d56128df4fd3c3c5a4731be2eb5eb094..5f85127436732b3165ce6e5baea8bc6999eee176 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1736,6 +1736,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entityType, Level level) { diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index 7a3bfa91ffc5c7c6b04eef7b1b1d3c04c5a6d856..07fd03f1a8e72a5b39e5f9fd13f401dbfdb45280 100644 +index 5abdf4253f1d0a6f35d8e05f7a0a2b4100083f76..5d3479a55a10444e3ad3d9ec16160f9d520a1dc6 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -284,7 +284,7 @@ public class Tadpole extends AbstractFish { +@@ -286,7 +286,7 @@ public class Tadpole extends AbstractFish { } } @@ -35,10 +35,10 @@ index 7a3bfa91ffc5c7c6b04eef7b1b1d3c04c5a6d856..07fd03f1a8e72a5b39e5f9fd13f401db } diff --git a/net/minecraft/world/level/storage/loot/LootPool.java b/net/minecraft/world/level/storage/loot/LootPool.java -index 29ad43245a310756c4227acd7532e905f7f8b8ee..ad422817593449b8e914628b51d760e732e2d50c 100644 +index 6901e629d941e22e64d83eed4e8cfee3165a96a1..fdc26c8d8c82c20534c57af2a0281b99998cc9f6 100644 --- a/net/minecraft/world/level/storage/loot/LootPool.java +++ b/net/minecraft/world/level/storage/loot/LootPool.java -@@ -36,7 +36,7 @@ public class LootPool { +@@ -37,7 +37,7 @@ public class LootPool { ) .apply(instance, LootPool::new) ); @@ -48,10 +48,10 @@ index 29ad43245a310756c4227acd7532e905f7f8b8ee..ad422817593449b8e914628b51d760e7 private final Predicate compositeCondition; private final List functions; diff --git a/net/minecraft/world/level/storage/loot/LootTable.java b/net/minecraft/world/level/storage/loot/LootTable.java -index 7a8eb1e8b07647e1124594f78652d34731e4fda6..6cfe7ef8c81f506bce9c971b597cc4e902bcabbe 100644 +index 8612cdf7161f8ddff60a6478cc901318b8f958ba..07a962d647baa99b0e1bf3898a07cc914e91397e 100644 --- a/net/minecraft/world/level/storage/loot/LootTable.java +++ b/net/minecraft/world/level/storage/loot/LootTable.java -@@ -49,7 +49,7 @@ public class LootTable { +@@ -50,7 +50,7 @@ public class LootTable { public static final LootTable EMPTY = new LootTable(LootContextParamSets.EMPTY, Optional.empty(), List.of(), List.of()); private final ContextKeySet paramSet; private final Optional randomSequence; @@ -61,23 +61,23 @@ index 7a8eb1e8b07647e1124594f78652d34731e4fda6..6cfe7ef8c81f506bce9c971b597cc4e9 private final BiFunction compositeFunction; public org.bukkit.craftbukkit.CraftLootTable craftLootTable; // CraftBukkit diff --git a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java -index 8e91ddc6c0e492d165ad8322b4a3d5c3bad5409c..6e420bfb3c223b094157bdfec7dad20d8eab4968 100644 +index eeaa49e9f70a18b5d39493aeff73f31b05ac2faa..8cd0403d7873c4c37caef75935b06b056c3d951d 100644 --- a/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java +++ b/net/minecraft/world/level/storage/loot/entries/CompositeEntryBase.java -@@ -9,7 +9,7 @@ import net.minecraft.world.level.storage.loot.ValidationContext; - import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; - - public abstract class CompositeEntryBase extends LootPoolEntryContainer { +@@ -16,7 +16,7 @@ public abstract class CompositeEntryBase extends LootPoolEntryContainer { + return "Empty children list"; + } + }; - protected final List children; + public final List children; // Leaves - private -> public private final ComposableEntryContainer composedChildren; protected CompositeEntryBase(List children, List conditions) { diff --git a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java -index e0e933245e038b7229eeddbda272b081161ab603..c5e3834fa970ac909cefea43420378394153d781 100644 +index 65e27bce9e59ef97bc8b914d646fba924d0f0877..a49bdcdf37b351436e0ba6d7865f10827c4e6ab4 100644 --- a/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java +++ b/net/minecraft/world/level/storage/loot/entries/LootPoolEntryContainer.java -@@ -13,7 +13,7 @@ import net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder; +@@ -14,7 +14,7 @@ import net.minecraft.world.level.storage.loot.predicates.ConditionUserBuilder; import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; public abstract class LootPoolEntryContainer implements ComposableEntryContainer { @@ -87,23 +87,23 @@ index e0e933245e038b7229eeddbda272b081161ab603..c5e3834fa970ac909cefea4342037839 protected LootPoolEntryContainer(List conditions) { diff --git a/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java b/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java -index f7b647e81ca99040bae8161a2bc0dcacf5bd537f..069df530b1db72bd4a2b1b80b2570dca545dfd20 100644 +index 141026601cd9a4561426b85fd1f8e7dc0544fbd7..a5d7ebb93c147bf0f806ac3c9b2dc4b878573944 100644 --- a/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java +++ b/net/minecraft/world/level/storage/loot/entries/NestedLootTable.java -@@ -22,7 +22,7 @@ public class NestedLootTable extends LootPoolSingletonContainer { - .and(singletonFields(instance)) - .apply(instance, NestedLootTable::new) - ); +@@ -29,7 +29,7 @@ public class NestedLootTable extends LootPoolSingletonContainer { + return "->{inline}"; + } + }; - private final Either, LootTable> contents; + public final Either, LootTable> contents; // Leaves - private -> public private NestedLootTable( Either, LootTable> contents, int weight, int quality, List conditions, List functions diff --git a/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java b/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java -index 7134c54984a12949cd6a2e8dc35c2e1c0431e524..52f36fbb9bfcad81004e531efab85e9b87d3284d 100644 +index bae72197acc929c7ed3e964f156115d728eb2176..8f3094f42f3366a1313d70c0b27fbe5632b2082a 100644 --- a/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java +++ b/net/minecraft/world/level/storage/loot/predicates/CompositeLootItemCondition.java -@@ -11,7 +11,7 @@ import net.minecraft.world.level.storage.loot.LootContext; +@@ -12,7 +12,7 @@ import net.minecraft.world.level.storage.loot.LootContext; import net.minecraft.world.level.storage.loot.ValidationContext; public abstract class CompositeLootItemCondition implements LootItemCondition { diff --git a/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch b/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch index 93a6b810..9fa20f7d 100644 --- a/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch +++ b/leaf-server/minecraft-patches/features/0114-Leaves-Xaero-Map-Protocol.patch @@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by Xaero Map diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 88ee35fffd6ae3183c23891ab22ec5c45e3c711f..5372599cf3d1310e28530945db13c0df4d4dbd15 100644 +index e547d6c9ee9ad3438cc839389db26a3417cc4ba4..4de0da41eaa71edd0ec7c6829dce424795a63dd8 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1239,6 +1239,7 @@ public abstract class PlayerList { +@@ -1235,6 +1235,7 @@ public abstract class PlayerList { player.connection.send(new ClientboundInitializeBorderPacket(worldBorder)); player.connection.send(new ClientboundSetTimePacket(level.getGameTime(), level.getDayTime(), level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getSharedSpawnPos(), level.getSharedSpawnAngle())); diff --git a/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch b/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch index 168bfebb..111a1626 100644 --- a/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch +++ b/leaf-server/minecraft-patches/features/0115-Leaves-Syncmatica-Protocol.patch @@ -9,10 +9,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by Syncmatica (https://github.com/End-Tech/syncmatica) diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 44e96e867d8a4403a7c88f772d2aa60cbe9f516b..0bf9ead58e256dccd3c1e89bd08ebae9d630b49e 100644 +index d1245f54d55e4a3c406feef3cc2d5e25bb6346ce..8e0e119b41ca1e49d7e3f7874c5fb3c2b434e737 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -319,8 +319,11 @@ public class ServerGamePacketListenerImpl +@@ -322,8 +322,11 @@ public class ServerGamePacketListenerImpl this.signedMessageDecoder = SignedMessageChain.Decoder.unsigned(player.getUUID(), server::enforceSecureProfile); this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event diff --git a/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch b/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch index d84ccea7..60c25cd5 100644 --- a/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch +++ b/leaf-server/minecraft-patches/features/0116-Leaves-Replay-Mod-API.patch @@ -11,10 +11,10 @@ Original project: https://github.com/LeavesMC/Leaves This patch is Powered by ReplayMod(https://github.com/ReplayMod) diff --git a/net/minecraft/commands/CommandSourceStack.java b/net/minecraft/commands/CommandSourceStack.java -index 4d06587cd55af988eecdda5186577ab72ca3d533..6d1096d6cdf0ae23ab4cacabe4dbe531fea455a7 100644 +index 51caf352e77df49fc04bf84f1fab29b6f4f4fc14..3fb3afb4171e6ff57c73cd228c2b41b2cb543ea5 100644 --- a/net/minecraft/commands/CommandSourceStack.java +++ b/net/minecraft/commands/CommandSourceStack.java -@@ -625,7 +625,7 @@ public class CommandSourceStack implements ExecutionCommandSource getOnlinePlayerNames() { @@ -92,10 +92,10 @@ index b305ba9bab617bf4e52d0e6ddf160bacc5751a94..bbaf1a29f86a9bfc13795249d545b6f7 if (players.size() >= resultLimit) { return players; diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 2c50bde56da7174dcea828feedecb92c98347a45..ee07832a92b3f73bd85d13388276cf224743c0ed 100644 +index 5f85127436732b3165ce6e5baea8bc6999eee176..1635de2b25a4162036522615424d9e845def6258 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1639,7 +1639,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { - PlayerList playerList = context.getSource().getServer().getPlayerList(); + (commandContext, suggestionsBuilder) -> { + PlayerList playerList = commandContext.getSource().getServer().getPlayerList(); return SharedSuggestionProvider.suggest( - playerList.getPlayers() + playerList.realPlayers // Leaves - only real player .stream() - .filter(player -> !playerList.isOp(player.getGameProfile())) - .map(player -> player.getGameProfile().getName()), + .filter(serverPlayer -> !playerList.isOp(serverPlayer.getGameProfile())) + .map(serverPlayer -> serverPlayer.getGameProfile().getName()), diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e083c2f8ba 100644 +index 95c128f028c3cce7d0b37821a6e75208323fb4e9..2cf0fa70ae3d7675cac3cf7a0002097b4e773fe1 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -212,6 +212,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -215,6 +215,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe public boolean hasEntityMoveEvent; // Paper - Add EntityMoveEvent private final alternate.current.wire.WireHandler wireHandler = new alternate.current.wire.WireHandler(this); // Paper - optimize redstone (Alternate Current) public boolean hasRidableMoveEvent = false; // Purpur - Ridables @@ -145,7 +145,7 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 @Override public @Nullable LevelChunk getChunkIfLoaded(int x, int z) { -@@ -690,6 +691,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -694,6 +695,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // Paper end - rewrite chunk system this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit this.preciseTime = this.serverLevelData.getDayTime(); // Purpur - Configurable daylight cycle @@ -153,7 +153,7 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 } // Paper start -@@ -2690,6 +2692,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2735,6 +2737,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe // ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server; moved down below valid=true if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.add(serverPlayer); @@ -162,10 +162,10 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 + ServerLevel.this.realPlayers.add(serverPlayer); + } + // Leaves end - skip - ServerLevel.this.updateSleepingPlayerList(); - } - -@@ -2760,6 +2767,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe + if (serverPlayer.isReceivingWaypoints()) { + ServerLevel.this.getWaypointManager().addPlayer(serverPlayer); + } +@@ -2813,6 +2820,11 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe ServerLevel.this.getChunkSource().removeEntity(entity); if (entity instanceof ServerPlayer serverPlayer) { ServerLevel.this.players.remove(serverPlayer); @@ -174,14 +174,14 @@ index e6730996dfd4c2422b6c13f10309fc58af4ac595..9b193bf81cf7f9f45dfa207a826043e0 + ServerLevel.this.realPlayers.remove(serverPlayer); + } + // Leaves end - skip + ServerLevel.this.getWaypointManager().removePlayer(serverPlayer); ServerLevel.this.updateSleepingPlayerList(); } - diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd4ad5df72 100644 +index 4de0da41eaa71edd0ec7c6829dce424795a63dd8..ca814b82dfb3d4bb04517cf61cb6018c7dd13d79 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -132,6 +132,7 @@ public abstract class PlayerList { +@@ -131,6 +131,7 @@ public abstract class PlayerList { private boolean allowCommandsForAllPlayers; private static final boolean ALLOW_LOGOUTIVATOR = false; private int sendAllPlayerInfoIn; @@ -189,7 +189,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd // CraftBukkit start private org.bukkit.craftbukkit.CraftServer cserver; -@@ -150,6 +151,106 @@ public abstract class PlayerList { +@@ -149,6 +150,106 @@ public abstract class PlayerList { abstract public void loadAndSaveFiles(); // Paper - fix converting txt to json file; moved from DedicatedPlayerList constructor @@ -296,28 +296,28 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie cookie) { player.isRealPlayer = true; // Paper player.loginTime = System.currentTimeMillis(); // Paper - Replace OfflinePlayer#getLastPlayed -@@ -317,6 +418,7 @@ public abstract class PlayerList { +@@ -318,6 +419,7 @@ public abstract class PlayerList { - // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below - this.players.add(player); -+ this.realPlayers.add(player); // Leaves - replay api - this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot - this.playersByUUID.put(player.getUUID(), player); - this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info -@@ -379,6 +481,12 @@ public abstract class PlayerList { - continue; - } + // player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below + this.players.add(player); ++ this.realPlayers.add(player); // Leaves - replay api + this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot + this.playersByUUID.put(player.getUUID(), player); + this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info +@@ -380,6 +482,12 @@ public abstract class PlayerList { + continue; + } -+ // Leaves start - skip photographer -+ if (entityplayer1 instanceof org.leavesmc.leaves.replay.ServerPhotographer) { -+ continue; -+ } -+ // Leaves end - skip photographer ++ // Leaves start - skip photographer ++ if (entityplayer1 instanceof org.leavesmc.leaves.replay.ServerPhotographer) { ++ continue; ++ } ++ // Leaves end - skip photographer + - onlinePlayers.add(entityplayer1); // Paper - Use single player info update packet on join - } - // Paper start - Use single player info update packet on join -@@ -520,6 +628,43 @@ public abstract class PlayerList { + onlinePlayers.add(entityplayer1); // Paper - Use single player info update packet on join + } + // Paper start - Use single player info update packet on join +@@ -523,6 +631,43 @@ public abstract class PlayerList { } } @@ -361,7 +361,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd public @Nullable net.kyori.adventure.text.Component remove(ServerPlayer player) { // CraftBukkit - return string // Paper - return Component // Paper start - Fix kick event leave message not being sent return this.remove(player, net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? player.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(player.getDisplayName()))); -@@ -596,6 +741,7 @@ public abstract class PlayerList { +@@ -599,6 +744,7 @@ public abstract class PlayerList { player.retireScheduler(); // Paper - Folia schedulers player.getAdvancements().stopListening(); this.players.remove(player); @@ -369,7 +369,7 @@ index 5372599cf3d1310e28530945db13c0df4d4dbd15..4f8d925425bef31ed70501826ddb9ddd this.playersByName.remove(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot this.removeFromSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info this.server.getCustomBossEvents().onPlayerDisconnect(player); -@@ -688,7 +834,7 @@ public abstract class PlayerList { +@@ -691,7 +837,7 @@ public abstract class PlayerList { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) // ? Component.translatable("multiplayer.disconnect.server_full") // : null; diff --git a/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch b/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch index ccd7d83c..b496be3d 100644 --- a/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch +++ b/leaf-server/minecraft-patches/features/0117-Petal-Async-Pathfinding.patch @@ -19,10 +19,10 @@ This patch was ported downstream from the Petal fork. Makes most pathfinding-related work happen asynchronously diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index fbcf26c0bfb9f496c99bd5a2ba988be06162cd52..cf136bc3d0d285ebde23c6e31c002933564fdcb2 100644 +index c5f4b878aa5d736d987982c94fbf557c0f267bbf..a6be753d1284167e090c40e6dcfbaa56b4e3d774 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -243,6 +243,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -246,6 +246,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Nullable @Override public LivingEntity getTarget() { @@ -290,20 +290,20 @@ index 4f9f3367b1ca3903df03a80fa2b01a3d24e6e77d..51413df5cd61b3ff59c6c6c3ec69d673 + // Leaf end - Kaiiju - petal - Async path processing } diff --git a/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java b/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java -index d8f532c5e68ff4dff933556c4f981e9474c044e6..95733482a647935e1e7f81fa71a0e99ea52e9a9b 100644 +index 73bba480f3f017a8aed14562bd82ba33db04391c..ed73a102d1ca58d0c2d4ea6d715511284fa90896 100644 --- a/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java +++ b/net/minecraft/world/entity/ai/goal/DoorInteractGoal.java -@@ -56,7 +56,7 @@ public abstract class DoorInteractGoal extends Goal { +@@ -54,7 +54,7 @@ public abstract class DoorInteractGoal extends Goal { + return false; } else { - GroundPathNavigation groundPathNavigation = (GroundPathNavigation)this.mob.getNavigation(); - Path path = groundPathNavigation.getPath(); + Path path = this.mob.getNavigation().getPath(); - if (path != null && !path.isDone()) { + if (path != null && path.isProcessed() && !path.isDone()) { // Kaiiju - async pathfinding - ensure path is processed for (int i = 0; i < Math.min(path.getNextNodeIndex() + 2, path.getNodeCount()); i++) { Node node = path.getNode(i); this.doorPos = new BlockPos(node.x, node.y + 1, node.z); diff --git a/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java b/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java -index 66a02fe7594522ef391d67e09856bf3f70fe597d..55e4e6542ac05d89b8d062c546de85b29fb0099f 100644 +index 458ceec68ca138b0aa9b70d6c934473c01d468f4..dc42e63d1c166aed02081e687ada76a0e74da7a7 100644 --- a/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/AmphibiousPathNavigation.java @@ -12,9 +12,25 @@ public class AmphibiousPathNavigation extends PathNavigation { @@ -333,7 +333,7 @@ index 66a02fe7594522ef391d67e09856bf3f70fe597d..55e4e6542ac05d89b8d062c546de85b2 } diff --git a/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java b/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java -index 71ea68b56b3069bdf8e47931156b6ef49ea8ce5d..5de4c1138c7092ff8240fcb30cd64ff1f4d12088 100644 +index 077863b758fbc3e51f25bcf842d00a2cc07c6a2f..29490cf3cb3c42dbc1dff683d8942a40e2df71b6 100644 --- a/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/FlyingPathNavigation.java @@ -16,9 +16,25 @@ public class FlyingPathNavigation extends PathNavigation { @@ -371,7 +371,7 @@ index 71ea68b56b3069bdf8e47931156b6ef49ea8ce5d..5de4c1138c7092ff8240fcb30cd64ff1 if (!this.isDone()) { if (this.canUpdatePath()) { diff --git a/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java -index 045cfafb3afe8271d60852ae3c7cdcb039b44d4f..3f55b00e2f8924a8450df8a3f9812a4ae2983df3 100644 +index 86fccf3617a32f3791b03d8067e2eaf6b8d8bebb..9cef6797e6d8eb43a51a1b94fea3947dd3d534da 100644 --- a/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java @@ -24,9 +24,25 @@ public class GroundPathNavigation extends PathNavigation { @@ -401,7 +401,7 @@ index 045cfafb3afe8271d60852ae3c7cdcb039b44d4f..3f55b00e2f8924a8450df8a3f9812a4a } diff --git a/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/net/minecraft/world/entity/ai/navigation/PathNavigation.java -index 6bbdfc748f1ce66689c63424fadcf261b1e967b3..84e855a4a9890a4772aee2383797cbc3d9b46dc3 100644 +index c8e4ccb96a0f162c780066cf4f61b970b49b7703..83cbb78fece9ddabcbbf3fc7a7dac06f5c02ab7c 100644 --- a/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/PathNavigation.java @@ -167,6 +167,10 @@ public abstract class PathNavigation { @@ -482,7 +482,7 @@ index 6bbdfc748f1ce66689c63424fadcf261b1e967b3..84e855a4a9890a4772aee2383797cbc3 Vec3 vec3 = new Vec3((endNode.x + this.mob.getX()) / 2.0, (endNode.y + this.mob.getY()) / 2.0, (endNode.z + this.mob.getZ()) / 2.0); return pos.closerToCenterThan(vec3, this.path.getNodeCount() - this.path.getNextNodeIndex()); diff --git a/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java b/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java -index 2979846853898d78a2df19df2287da16dbe4ae71..1289a6e85f3fdb9187323343b6c20e17b6a7e296 100644 +index ea0f6a19e4a79538e68917ba86cbc98be4dbca8d..e2ed5b1d9eca79dc5a63d70d718fdf8298969e97 100644 --- a/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java +++ b/net/minecraft/world/entity/ai/navigation/WaterBoundPathNavigation.java @@ -15,11 +15,27 @@ public class WaterBoundPathNavigation extends PathNavigation { @@ -560,10 +560,10 @@ index 1f96fd5085bacb4c584576c7cb9f51e7898e9b03..03b6c8c8dcd42e864751e68be9d35d20 + // Leaf end - Kaiiju - await on async path processing } diff --git a/net/minecraft/world/entity/animal/Bee.java b/net/minecraft/world/entity/animal/Bee.java -index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..04c0dad21c4cdd464a8ebe830bcdd217bb4156ec 100644 +index ca5651f15552f91fba650747d28a75c00fa11442..119e2b6b198fd4b2aaef7a9a5f46568bd52bd071 100644 --- a/net/minecraft/world/entity/animal/Bee.java +++ b/net/minecraft/world/entity/animal/Bee.java -@@ -936,7 +936,8 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -937,7 +937,8 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { } else { Bee.this.pathfindRandomlyTowards(Bee.this.hivePos); } @@ -573,7 +573,7 @@ index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..04c0dad21c4cdd464a8ebe830bcdd217 boolean flag = this.pathfindDirectlyTowards(Bee.this.hivePos); if (!flag) { this.dropAndBlacklistHive(); -@@ -990,7 +991,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -991,7 +992,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { return true; } else { Path path = Bee.this.navigation.getPath(); @@ -583,10 +583,10 @@ index e9dfff7e3726cd2229f89bb39fa1ca4815d99a6d..04c0dad21c4cdd464a8ebe830bcdd217 } } diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 71bae5f5ed284fed30262872771f85de97383d6d..50f9a11f8cb53fd1fa34017598ff3fe828b3ca25 100644 +index a7e9179c287671a689cb5ce668b5a33896da87a4..7d450b6ccde99657a7fac354ae386a80f9f7e879 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -488,9 +488,25 @@ public class Frog extends Animal { +@@ -489,9 +489,25 @@ public class Frog extends Animal { return pathType != PathType.WATER_BORDER && super.canCutCorner(pathType); } @@ -613,10 +613,10 @@ index 71bae5f5ed284fed30262872771f85de97383d6d..50f9a11f8cb53fd1fa34017598ff3fe8 } } diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index b85d1e196d2bf61ac4896205afb08eba89c4397e..c22f7054e0f78dcce3e3f9765e2ee9b63ca195ff 100644 +index 2e6d0f035a01277aa28bbe912d5df8dc4cf04547..f4428016e4fabc99dc79ecc39b7f6e0617e4dc7a 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -313,7 +313,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -308,7 +308,7 @@ public class Drowned extends Zombie implements RangedAttackMob { protected boolean closeToNextPos() { Path path = this.getNavigation().getPath(); @@ -656,10 +656,10 @@ index fe31c4a45afd61be8b74efe9d0858ccd0aced075..e1717b5c854aa81fdd7b7e715d7c3498 } diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index 497ea5d5aad1641d5876f23f05db82ab649c0785..e5193d7320ea17e86b776c705ec45010019493d6 100644 +index 147fb3eecf651dcee63d63255542ef2680140f66..a6109ac9d7f8a9aa4074b3e9504244b1d565a2d4 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -580,6 +580,16 @@ public class Warden extends Monster implements VibrationSystem { +@@ -576,6 +576,16 @@ public class Warden extends Monster implements VibrationSystem { @Override protected PathFinder createPathFinder(int maxVisitedNodes) { this.nodeEvaluator = new WalkNodeEvaluator(); diff --git a/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch b/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch index 5c809db3..d76de9de 100644 --- a/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch +++ b/leaf-server/minecraft-patches/features/0118-Petal-reduce-work-done-by-game-event-system.patch @@ -11,7 +11,7 @@ Original project: https://github.com/Bloom-host/Petal 2. EuclideanGameEventListenerRegistry is not used concurrently so we ban that usage for improved performance with allays diff --git a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java -index 2627583ab12d886b1fba0b1d1e599f942926b499..440d70811d96f97d3463c6aff131cbc5bd588254 100644 +index 0a94670dc20bb9c521b0395633eb100393895f6a..83c811eb5e493fa6630f16c206787f227fde089b 100644 --- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java +++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java @@ -65,7 +65,7 @@ public class SculkCatalystBlockEntity extends BlockEntity implements GameEventLi @@ -38,10 +38,10 @@ index 2627583ab12d886b1fba0b1d1e599f942926b499..440d70811d96f97d3463c6aff131cbc5 if (entity.getLastHurtByMob() instanceof ServerPlayer serverPlayer) { DamageSource damageSource = entity.getLastDamageSource() == null diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java -index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96131c8712 100644 +index 9e2debee38bc4b25281c8a8c6e7082cca1f7b569..27aa58ab47e7a7b0edddd1c483dc9165696ebf11 100644 --- a/net/minecraft/world/level/chunk/LevelChunk.java +++ b/net/minecraft/world/level/chunk/LevelChunk.java -@@ -80,7 +80,19 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -82,7 +82,19 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p private Supplier fullStatus; @Nullable private LevelChunk.PostLoadProcessor postLoad; @@ -62,7 +62,7 @@ index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96 private final LevelChunkTicks blockTicks; private final LevelChunkTicks fluidTicks; private LevelChunk.UnsavedListener unsavedListener = chunkPos -> {}; -@@ -155,7 +167,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -157,7 +169,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p ) { super(pos, data, level, net.minecraft.server.MinecraftServer.getServer().registryAccess().lookupOrThrow(Registries.BIOME), inhabitedTime, sections, blendingData); // Paper - Anti-Xray - The world isn't ready yet, use server singleton for registry this.level = (ServerLevel) level; // CraftBukkit - type @@ -71,7 +71,7 @@ index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96 for (Heightmap.Types types : Heightmap.Types.values()) { if (ChunkStatus.FULL.heightmapsAfter().contains(types)) { -@@ -267,10 +279,27 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -269,10 +281,27 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p @Override public GameEventListenerRegistry getListenerRegistry(int sectionY) { @@ -103,7 +103,7 @@ index a8db2a822deb07ddc707cf73fdc5c269d9842c06..800fc055024c176d1830e1d2686f5d96 } // Paper start - Perf: Reduce instructions and provide final method -@@ -617,7 +646,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p +@@ -620,7 +649,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p } private void removeGameEventListenerRegistry(int sectionY) { diff --git a/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch b/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch index 14e93be2..d81408ef 100644 --- a/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch +++ b/leaf-server/minecraft-patches/features/0119-Reduce-canSee-work.patch @@ -7,10 +7,10 @@ Co-authored by: Martijn Muijsers Co-authored by: MachineBreaker diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index a94f6eb93a4271d8b50cbb55dce04affd1ac4a13..9ac2ecb78f6214616376b0e3badef21dc3f72114 100644 +index dd8c7afecd62edc2ab3933034bf469aea729be53..3bd42eb81eae3af9323021a5dc6edaa06dfcaead 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java -@@ -987,17 +987,19 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl +@@ -988,17 +988,19 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl for (int i = 0, len = entities.size(); i < len; ++i) { Entity entity = entities.get(i); diff --git a/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch b/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch index aa11a26c..7efd239d 100644 --- a/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch +++ b/leaf-server/minecraft-patches/features/0120-Fix-sprint-glitch.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix sprint glitch diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ed15b5f29658d799a36dcbd196a8fcb107be4bda..09aa0b344aff0c48eec9a296d47c0704bd0fdc5c 100644 +index d59caf13e9066f2171c360e07a26122a540380a0..97098f05dda8a46716162dd0330ca60d30814999 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1387,7 +1387,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1419,7 +1419,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin player.setRealHealth(health); } diff --git a/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch b/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch index 4b0b4c32..f45af2bd 100644 --- a/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch +++ b/leaf-server/minecraft-patches/features/0121-Configurable-movement-speed-of-more-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable movement speed of more entities diff --git a/net/minecraft/world/entity/monster/Drowned.java b/net/minecraft/world/entity/monster/Drowned.java -index c22f7054e0f78dcce3e3f9765e2ee9b63ca195ff..2e04078664cd723e3e0c80565e4b6e6416b13901 100644 +index f4428016e4fabc99dc79ecc39b7f6e0617e4dc7a..7ff380212ce5e56e0e58e5f52f8c75bda5061ef0 100644 --- a/net/minecraft/world/entity/monster/Drowned.java +++ b/net/minecraft/world/entity/monster/Drowned.java -@@ -97,6 +97,7 @@ public class Drowned extends Zombie implements RangedAttackMob { +@@ -98,6 +98,7 @@ public class Drowned extends Zombie implements RangedAttackMob { public void initAttributes() { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.drownedMaxHealth); this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.drownedScale); @@ -29,10 +29,10 @@ index a4ce65911a5d778f60bcedb3acd9fe59a5094c96..f4200bdf2002c13259821b2781137089 @Override diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..447adc3dcfd31a6fb9e673555e9793a82f9e02d4 100644 +index ab4dc7b3a7593d255dbd7d1df667fce3504af3ed..185d138f65e884eb9b3fdd753bc4e2a14a25c4b1 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -127,6 +127,7 @@ public class Zombie extends Monster { +@@ -126,6 +126,7 @@ public class Zombie extends Monster { public void initAttributes() { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieMaxHealth); this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombieScale); @@ -40,7 +40,7 @@ index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..447adc3dcfd31a6fb9e673555e9793a8 } // Purpur end - Configurable entity base attributes -@@ -194,7 +195,7 @@ public class Zombie extends Monster { +@@ -193,7 +194,7 @@ public class Zombie extends Monster { public static AttributeSupplier.Builder createAttributes() { return Monster.createMonsterAttributes() .add(Attributes.FOLLOW_RANGE, 35.0) @@ -50,10 +50,10 @@ index 783f8b9a05939b9f42fc77065f6347e3c6ddf8f5..447adc3dcfd31a6fb9e673555e9793a8 .add(Attributes.ARMOR, 2.0) .add(Attributes.SPAWN_REINFORCEMENTS_CHANCE); diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index ae5939c940bdd93977fa882360fc31e46479554f..ba480249c1e8813931a668a37977347a73f3a3f5 100644 +index e218e5d5f146ec996a6f5ce7e76b1d6506ac1cb9..18966860f550ad1f35ec6a03a0b78af73628b964 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -98,6 +98,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -97,6 +97,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { @Override public void initAttributes() { this.getAttribute(net.minecraft.world.entity.ai.attributes.Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombieVillagerMaxHealth); @@ -62,10 +62,10 @@ index ae5939c940bdd93977fa882360fc31e46479554f..ba480249c1e8813931a668a37977347a @Override diff --git a/net/minecraft/world/entity/monster/ZombifiedPiglin.java b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -index 39489c8a347031fb4f73faca46039786e35762ac..4de1d0966157b20526386becee10b9be45f7a9ba 100644 +index f58c48d9de85fda3d13079f3e56b31af75b3c725..cc349403ceb9b094362e706f4e5b200a51071380 100644 --- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java +++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java -@@ -85,6 +85,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -86,6 +86,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { public void initAttributes() { this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(this.level().purpurConfig.zombifiedPiglinMaxHealth); this.getAttribute(Attributes.SCALE).setBaseValue(this.level().purpurConfig.zombifiedPiglinScale); @@ -73,7 +73,7 @@ index 39489c8a347031fb4f73faca46039786e35762ac..4de1d0966157b20526386becee10b9be } // Purpur end - Configurable entity base attributes -@@ -136,7 +137,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { +@@ -137,7 +138,7 @@ public class ZombifiedPiglin extends Zombie implements NeutralMob { public static AttributeSupplier.Builder createAttributes() { return Zombie.createAttributes() .add(Attributes.SPAWN_REINFORCEMENTS_CHANCE, 0.0) @@ -83,7 +83,7 @@ index 39489c8a347031fb4f73faca46039786e35762ac..4de1d0966157b20526386becee10b9be } diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java -index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d5e5cccb6 100644 +index 7137c05ac03580143c4a4d74881231800bd552f8..c432874257451b62fde4284526a647736fa3bcd0 100644 --- a/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/org/purpurmc/purpur/PurpurWorldConfig.java @@ -1625,6 +1625,7 @@ public class PurpurWorldConfig { @@ -102,7 +102,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean elderGuardianRidable = false; -@@ -2037,6 +2039,7 @@ public class PurpurWorldConfig { +@@ -2060,6 +2062,7 @@ public class PurpurWorldConfig { public boolean huskJockeyTryExistingChickens = true; public boolean huskTakeDamageFromWater = false; public boolean huskAlwaysDropExp = false; @@ -110,7 +110,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void huskSettings() { huskRidable = getBoolean("mobs.husk.ridable", huskRidable); huskRidableInWater = getBoolean("mobs.husk.ridable-in-water", huskRidableInWater); -@@ -2054,6 +2057,7 @@ public class PurpurWorldConfig { +@@ -2077,6 +2080,7 @@ public class PurpurWorldConfig { huskJockeyTryExistingChickens = getBoolean("mobs.husk.jockey.try-existing-chickens", huskJockeyTryExistingChickens); huskTakeDamageFromWater = getBoolean("mobs.husk.takes-damage-from-water", huskTakeDamageFromWater); huskAlwaysDropExp = getBoolean("mobs.husk.always-drop-exp", huskAlwaysDropExp); @@ -118,7 +118,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean illusionerRidable = false; -@@ -3424,6 +3428,7 @@ public class PurpurWorldConfig { +@@ -3447,6 +3451,7 @@ public class PurpurWorldConfig { public boolean zombieTakeDamageFromWater = false; public boolean zombieAlwaysDropExp = false; public double zombieHeadVisibilityPercent = 0.5D; @@ -126,7 +126,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void zombieSettings() { zombieRidable = getBoolean("mobs.zombie.ridable", zombieRidable); zombieRidableInWater = getBoolean("mobs.zombie.ridable-in-water", zombieRidableInWater); -@@ -3449,6 +3454,7 @@ public class PurpurWorldConfig { +@@ -3472,6 +3477,7 @@ public class PurpurWorldConfig { zombieTakeDamageFromWater = getBoolean("mobs.zombie.takes-damage-from-water", zombieTakeDamageFromWater); zombieAlwaysDropExp = getBoolean("mobs.zombie.always-drop-exp", zombieAlwaysDropExp); zombieHeadVisibilityPercent = getDouble("mobs.zombie.head-visibility-percent", zombieHeadVisibilityPercent); @@ -134,7 +134,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean zombieHorseRidable = false; -@@ -3498,6 +3504,7 @@ public class PurpurWorldConfig { +@@ -3521,6 +3527,7 @@ public class PurpurWorldConfig { public int zombieVillagerCuringTimeMax = 6000; public boolean zombieVillagerCureEnabled = true; public boolean zombieVillagerAlwaysDropExp = false; @@ -142,7 +142,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void zombieVillagerSettings() { zombieVillagerRidable = getBoolean("mobs.zombie_villager.ridable", zombieVillagerRidable); zombieVillagerRidableInWater = getBoolean("mobs.zombie_villager.ridable-in-water", zombieVillagerRidableInWater); -@@ -3518,6 +3525,7 @@ public class PurpurWorldConfig { +@@ -3541,6 +3548,7 @@ public class PurpurWorldConfig { zombieVillagerCuringTimeMax = getInt("mobs.zombie_villager.curing_time.max", zombieVillagerCuringTimeMax); zombieVillagerCureEnabled = getBoolean("mobs.zombie_villager.cure.enabled", zombieVillagerCureEnabled); zombieVillagerAlwaysDropExp = getBoolean("mobs.zombie_villager.always-drop-exp", zombieVillagerAlwaysDropExp); @@ -150,7 +150,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d } public boolean zombifiedPiglinRidable = false; -@@ -3532,6 +3540,7 @@ public class PurpurWorldConfig { +@@ -3555,6 +3563,7 @@ public class PurpurWorldConfig { public boolean zombifiedPiglinCountAsPlayerKillWhenAngry = false; public boolean zombifiedPiglinTakeDamageFromWater = false; public boolean zombifiedPiglinAlwaysDropExp = false; @@ -158,7 +158,7 @@ index cadfbb7310fce33eda24d69c39fda5689c7fb882..21765347d7a81f4111f23685f699286d private void zombifiedPiglinSettings() { zombifiedPiglinRidable = getBoolean("mobs.zombified_piglin.ridable", zombifiedPiglinRidable); zombifiedPiglinRidableInWater = getBoolean("mobs.zombified_piglin.ridable-in-water", zombifiedPiglinRidableInWater); -@@ -3553,6 +3562,7 @@ public class PurpurWorldConfig { +@@ -3576,6 +3585,7 @@ public class PurpurWorldConfig { zombifiedPiglinCountAsPlayerKillWhenAngry = getBoolean("mobs.zombified_piglin.count-as-player-kill-when-angry", zombifiedPiglinCountAsPlayerKillWhenAngry); zombifiedPiglinTakeDamageFromWater = getBoolean("mobs.zombified_piglin.takes-damage-from-water", zombifiedPiglinTakeDamageFromWater); zombifiedPiglinAlwaysDropExp = getBoolean("mobs.zombified_piglin.always-drop-exp", zombifiedPiglinAlwaysDropExp); diff --git a/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch b/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch index 07560db6..9fe50807 100644 --- a/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch +++ b/leaf-server/minecraft-patches/features/0122-Faster-sequencing-of-futures-for-chunk-structure-gen.patch @@ -7,7 +7,7 @@ Replace `thenApply` with `thenCompose`. Once one task is completed then the next to prevent blocking threads while waiting to complete all tasks. But may cause the sequence of future compose disorder. diff --git a/net/minecraft/Util.java b/net/minecraft/Util.java -index d1fcc73f579d1c4ac79213ad039c8d803ff51b1a..9918572306e983281d05c6d28c8a5d843348ad2d 100644 +index 0a69469c79aaa2466cda04f6acefed18e421d555..82ee6c27ebc2718ad88b640775d949ec6d7cfed2 100644 --- a/net/minecraft/Util.java +++ b/net/minecraft/Util.java @@ -620,17 +620,39 @@ public class Util { @@ -51,10 +51,10 @@ index d1fcc73f579d1c4ac79213ad039c8d803ff51b1a..9918572306e983281d05c6d28c8a5d84 CompletableFuture> completableFuture = new CompletableFuture<>(); return fallibleSequence(completableFutures, completableFuture::completeExceptionally).applyToEither(completableFuture, Function.identity()); diff --git a/net/minecraft/server/ReloadableServerRegistries.java b/net/minecraft/server/ReloadableServerRegistries.java -index d8c472b8c6aadcaadef14abd8ab43f466e94417e..bc079b6c3d751f2a63d089bf209cf7d8e0da76e8 100644 +index 512d59188ff43e34463e2845aa8a174792c407a7..ca84304526050176ca7406f7a13c144798a0ed74 100644 --- a/net/minecraft/server/ReloadableServerRegistries.java +++ b/net/minecraft/server/ReloadableServerRegistries.java -@@ -52,7 +52,7 @@ public class ReloadableServerRegistries { +@@ -50,7 +50,7 @@ public class ReloadableServerRegistries { List>> list1 = LootDataType.values() .map(lootDataType -> scheduleRegistryLoad((LootDataType)lootDataType, registryOps, resourceManager, backgroundExecutor, conversions)) // Paper .toList(); diff --git a/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch b/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch index 6adee127..9f953281 100644 --- a/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch +++ b/leaf-server/minecraft-patches/features/0123-Reduce-active-items-finding-hopper-nearby-check.patch @@ -9,10 +9,10 @@ But still recommend to turn-off `checkForMinecartNearItemWhileActive` Since `Reduce-hopper-item-checks.patch` will cause lag under massive dropped items diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index 8aab412c8e70b6f9d8e05a26cefac330dd7a2ea1..ecec91d28d1b71d549f48185af5f1ef3286768be 100644 +index 93303c5499e621c8dd2152e4faccf08c4ba119f3..8939803cd30a8453457f832d6a9a8c1128dafe0e 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -248,7 +248,11 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -238,7 +238,11 @@ public class ItemEntity extends Entity implements TraceableEntity { this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause return; // Gale - EMC - reduce hopper item checks } diff --git a/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch b/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch index 6b9c1f90..121b0703 100644 --- a/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch +++ b/leaf-server/minecraft-patches/features/0124-Plazma-Add-some-missing-Pufferfish-configurations.patch @@ -10,10 +10,10 @@ Add Pufferfish DAB support for Camel, Sniffer https://github.com/pufferfish-gg/Pufferfish/issues/83 diff --git a/net/minecraft/world/entity/animal/armadillo/Armadillo.java b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -index fb8a56d0ee80b0d397f2acd3af1f52fc26676b62..5d93eb5e56e45d485c0718db9e3d8754e97b691c 100644 +index b0ce3ab6939cb9e37171bb64e8c5308deb03195e..c520c4e478e3191cea7c2345a2e4c42b67c0762a 100644 --- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java +++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java -@@ -162,8 +162,10 @@ public class Armadillo extends Animal { +@@ -163,8 +163,10 @@ public class Armadillo extends Animal { return ArmadilloAi.makeBrain(this.brainProvider().makeBrain(dynamic)); } @@ -25,10 +25,10 @@ index fb8a56d0ee80b0d397f2acd3af1f52fc26676b62..5d93eb5e56e45d485c0718db9e3d8754 ArmadilloAi.updateActivity(this); if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) { diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index 101931ff4474ab4445be3fa1a241a731ad3ac1da..8d2dc9b94a13c386b7e54788a9ec6baf15c09a13 100644 +index 949b6c563658e6e46ac5842d6f088ecae6d4cd0c..c2107133d3def5ef5de7837499d33b5dbf5c20b6 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -167,9 +167,11 @@ public class Camel extends AbstractHorse { +@@ -169,9 +169,11 @@ public class Camel extends AbstractHorse { return pose == Pose.SITTING ? SITTING_DIMENSIONS.scale(this.getAgeScale()) : super.getDefaultDimensions(pose); } @@ -41,10 +41,10 @@ index 101931ff4474ab4445be3fa1a241a731ad3ac1da..8d2dc9b94a13c386b7e54788a9ec6baf CamelAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 0565b37dd5320b49efb11cf28f064d6a970048aa..598216a2794d2c7b325a9e479dfb553427fa0bc7 100644 +index a762fc8a4616c4e48e11accdca2129fd47f300e6..08bc21733c08b9df28803b36d3fb17aa3cc29345 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -482,8 +482,10 @@ public class Sniffer extends Animal { +@@ -493,8 +493,10 @@ public class Sniffer extends Animal { return Brain.provider(SnifferAi.MEMORY_TYPES, SnifferAi.SENSOR_TYPES); } @@ -71,10 +71,10 @@ index d91ce14cc39b1b6ccd558f53ed605d4c6a5acae5..52558a99c915da3c46e5f63bd8014cfc BreezeAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index c9404d72de59e18dc809b8dec107f1f23d50f441..91c6956311da3694cb3cda2f7a86c7e110c0d212 100644 +index 775c11f658b81379784f7e5bdfdc8105b3410480..49f962bbbce22dd26555ee2092ceff96e82aa6b2 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -231,8 +231,10 @@ public class Creaking extends Monster { +@@ -232,8 +232,10 @@ public class Creaking extends Monster { return (Brain)super.getBrain(); } diff --git a/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch b/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch index f52a2a4c..1b23533e 100644 --- a/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch +++ b/leaf-server/minecraft-patches/features/0125-Plazma-Add-missing-purpur-configuration-options.patch @@ -9,10 +9,10 @@ Original project: https://github.com/PlazmaMC/PlazmaBukkit Add more Purpur configurable options for entities diff --git a/net/minecraft/world/entity/animal/allay/Allay.java b/net/minecraft/world/entity/animal/allay/Allay.java -index 18107d9be4d9ba816852ee4595a5349867834bef..ffa224d6cff03ad903ed38636eb3857f5919912f 100644 +index a25976d6f0dec86b88017cd5f86f3b51c8d7444b..cb88b1afe261f95998a19fcb555f91143834ba3a 100644 --- a/net/minecraft/world/entity/animal/allay/Allay.java +++ b/net/minecraft/world/entity/animal/allay/Allay.java -@@ -177,6 +177,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS +@@ -174,6 +174,18 @@ public class Allay extends PathfinderMob implements InventoryCarrier, VibrationS } // Purpur end - Configurable entity base attributes @@ -32,10 +32,10 @@ index 18107d9be4d9ba816852ee4595a5349867834bef..ffa224d6cff03ad903ed38636eb3857f protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); diff --git a/net/minecraft/world/entity/animal/camel/Camel.java b/net/minecraft/world/entity/animal/camel/Camel.java -index 8d2dc9b94a13c386b7e54788a9ec6baf15c09a13..29c264b70eb5ce15e8c24d444d3fd50c5cab6a1c 100644 +index c2107133d3def5ef5de7837499d33b5dbf5c20b6..04c3fb56a4014025b6a9c01e97f0ffbd678b414a 100644 --- a/net/minecraft/world/entity/animal/camel/Camel.java +++ b/net/minecraft/world/entity/animal/camel/Camel.java -@@ -101,6 +101,18 @@ public class Camel extends AbstractHorse { +@@ -103,6 +103,18 @@ public class Camel extends AbstractHorse { } // Purpur end - Make entity breeding times configurable @@ -52,9 +52,9 @@ index 8d2dc9b94a13c386b7e54788a9ec6baf15c09a13..29c264b70eb5ce15e8c24d444d3fd50c + // Leaf start - Plazma - Add missing purpur configuration options + @Override - public void addAdditionalSaveData(CompoundTag compound) { - super.addAdditionalSaveData(compound); -@@ -171,7 +183,7 @@ public class Camel extends AbstractHorse { + protected void addAdditionalSaveData(ValueOutput output) { + super.addAdditionalSaveData(output); +@@ -173,7 +185,7 @@ public class Camel extends AbstractHorse { @Override protected void customServerAiStep(ServerLevel level) { Brain brain = this.getBrain(); @@ -64,10 +64,10 @@ index 8d2dc9b94a13c386b7e54788a9ec6baf15c09a13..29c264b70eb5ce15e8c24d444d3fd50c CamelAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/animal/frog/Frog.java b/net/minecraft/world/entity/animal/frog/Frog.java -index 50f9a11f8cb53fd1fa34017598ff3fe828b3ca25..9f9abbd3272cba17f79dc4da6cf2cd4d3ab2cc8b 100644 +index 7d450b6ccde99657a7fac354ae386a80f9f7e879..7143a7b8aae713fd7f2f167a949f98b964e72c78 100644 --- a/net/minecraft/world/entity/animal/frog/Frog.java +++ b/net/minecraft/world/entity/animal/frog/Frog.java -@@ -169,6 +169,23 @@ public class Frog extends Animal { +@@ -170,6 +170,23 @@ public class Frog extends Animal { } // Purpur end - Make entity breeding times configurable @@ -92,10 +92,10 @@ index 50f9a11f8cb53fd1fa34017598ff3fe828b3ca25..9f9abbd3272cba17f79dc4da6cf2cd4d protected Brain.Provider brainProvider() { return Brain.provider(MEMORY_TYPES, SENSOR_TYPES); diff --git a/net/minecraft/world/entity/animal/frog/Tadpole.java b/net/minecraft/world/entity/animal/frog/Tadpole.java -index 07fd03f1a8e72a5b39e5f9fd13f401dbfdb45280..daa315bfbedb0ec21a684d9141fb41ad40ce45b1 100644 +index 5d3479a55a10444e3ad3d9ec16160f9d520a1dc6..0e322f480e0a6302124847e26c4bed06678e78e4 100644 --- a/net/minecraft/world/entity/animal/frog/Tadpole.java +++ b/net/minecraft/world/entity/animal/frog/Tadpole.java -@@ -106,6 +106,23 @@ public class Tadpole extends AbstractFish { +@@ -108,6 +108,23 @@ public class Tadpole extends AbstractFish { } // Purpur end - Ridables @@ -120,10 +120,10 @@ index 07fd03f1a8e72a5b39e5f9fd13f401dbfdb45280..daa315bfbedb0ec21a684d9141fb41ad protected PathNavigation createNavigation(Level level) { return new WaterBoundPathNavigation(this, level); diff --git a/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 598216a2794d2c7b325a9e479dfb553427fa0bc7..fca5464de3fe07c74e26c9c608efaa3c150c11a1 100644 +index 08bc21733c08b9df28803b36d3fb17aa3cc29345..1f545d4c9a3de0d6630a92481920ed6c3553ce97 100644 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -118,6 +118,18 @@ public class Sniffer extends Animal { +@@ -119,6 +119,18 @@ public class Sniffer extends Animal { } // Purpur end - Make entity breeding times configurable @@ -142,7 +142,7 @@ index 598216a2794d2c7b325a9e479dfb553427fa0bc7..fca5464de3fe07c74e26c9c608efaa3c @Override protected void defineSynchedData(SynchedEntityData.Builder builder) { super.defineSynchedData(builder); -@@ -485,7 +497,7 @@ public class Sniffer extends Animal { +@@ -496,7 +508,7 @@ public class Sniffer extends Animal { private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations @Override protected void customServerAiStep(ServerLevel level) { @@ -152,10 +152,10 @@ index 598216a2794d2c7b325a9e479dfb553427fa0bc7..fca5464de3fe07c74e26c9c608efaa3c SnifferAi.updateActivity(this); super.customServerAiStep(level); diff --git a/net/minecraft/world/entity/monster/creaking/Creaking.java b/net/minecraft/world/entity/monster/creaking/Creaking.java -index 91c6956311da3694cb3cda2f7a86c7e110c0d212..d4adacff205f6c6d94f2c7376485ac259aa94d61 100644 +index 49f962bbbce22dd26555ee2092ceff96e82aa6b2..ef0522feaa1cc9704f778309c1e6cf1d68379376 100644 --- a/net/minecraft/world/entity/monster/creaking/Creaking.java +++ b/net/minecraft/world/entity/monster/creaking/Creaking.java -@@ -131,6 +131,18 @@ public class Creaking extends Monster { +@@ -132,6 +132,18 @@ public class Creaking extends Monster { } // Purpur end - Configurable entity base attributes @@ -174,7 +174,7 @@ index 91c6956311da3694cb3cda2f7a86c7e110c0d212..d4adacff205f6c6d94f2c7376485ac25 @Override protected BodyRotationControl createBodyControl() { return new Creaking.CreakingBodyRotationControl(this); -@@ -234,7 +246,7 @@ public class Creaking extends Monster { +@@ -235,7 +247,7 @@ public class Creaking extends Monster { private int behaviorTick; // Leaf - Plazma - Add missing Pufferfish configurations @Override protected void customServerAiStep(ServerLevel level) { @@ -184,10 +184,10 @@ index 91c6956311da3694cb3cda2f7a86c7e110c0d212..d4adacff205f6c6d94f2c7376485ac25 CreakingAi.updateActivity(this); } diff --git a/net/minecraft/world/entity/monster/warden/Warden.java b/net/minecraft/world/entity/monster/warden/Warden.java -index e5193d7320ea17e86b776c705ec45010019493d6..ed221514a407f1c07986d138a17c588a523d76b8 100644 +index a6109ac9d7f8a9aa4074b3e9504244b1d565a2d4..e0bd1268f77b7234331c9fea0b11b5b04a66a4ad 100644 --- a/net/minecraft/world/entity/monster/warden/Warden.java +++ b/net/minecraft/world/entity/monster/warden/Warden.java -@@ -150,6 +150,23 @@ public class Warden extends Monster implements VibrationSystem { +@@ -148,6 +148,23 @@ public class Warden extends Monster implements VibrationSystem { } // Purpur end - Ridables @@ -211,7 +211,7 @@ index e5193d7320ea17e86b776c705ec45010019493d6..ed221514a407f1c07986d138a17c588a @Override public Packet getAddEntityPacket(ServerEntity entity) { return new ClientboundAddEntityPacket(this, entity, this.hasPose(Pose.EMERGING) ? 1 : 0); -@@ -304,7 +321,7 @@ public class Warden extends Monster implements VibrationSystem { +@@ -302,7 +319,7 @@ public class Warden extends Monster implements VibrationSystem { private int behaviorTick = 0; // Pufferfish @Override protected void customServerAiStep(ServerLevel level) { @@ -221,10 +221,10 @@ index e5193d7320ea17e86b776c705ec45010019493d6..ed221514a407f1c07986d138a17c588a super.customServerAiStep(level); if ((this.tickCount + this.getId()) % 120 == 0) { diff --git a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -index 900c2fdd58da1ba6441f74175b6967b608248315..bf7f1338584d67ed93bd73f5de83a9811d08558f 100644 +index 04b8d4be8d7b36585041b5ff69251d4150e54cae..c73840d0a08366b2d2ee3286589ab4e4e03d122d 100644 --- a/net/minecraft/world/entity/vehicle/AbstractChestBoat.java +++ b/net/minecraft/world/entity/vehicle/AbstractChestBoat.java -@@ -27,7 +27,7 @@ import net.minecraft.world.level.storage.loot.LootTable; +@@ -28,7 +28,7 @@ import net.minecraft.world.level.storage.loot.LootTable; public abstract class AbstractChestBoat extends AbstractBoat implements HasCustomInventoryScreen, ContainerEntity { private static final int CONTAINER_SIZE = 27; @@ -233,7 +233,7 @@ index 900c2fdd58da1ba6441f74175b6967b608248315..bf7f1338584d67ed93bd73f5de83a981 @Nullable private ResourceKey lootTable; private long lootTableSeed; -@@ -111,7 +111,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto +@@ -108,7 +108,7 @@ public abstract class AbstractChestBoat extends AbstractBoat implements HasCusto @Override public int getContainerSize() { @@ -243,10 +243,10 @@ index 900c2fdd58da1ba6441f74175b6967b608248315..bf7f1338584d67ed93bd73f5de83a981 @Override diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java -index 234f123959830cc2adb78b9dc8752906140e5b11..e0dceff32b47b334ddcb76271e3cf3ea0d27e5f1 100644 +index ed777b003140486fd5d8d1db7af770301e30bec9..31450de492fbfdd83608ae668072bebd525db566 100644 --- a/org/purpurmc/purpur/PurpurConfig.java +++ b/org/purpurmc/purpur/PurpurConfig.java -@@ -322,6 +322,7 @@ public class PurpurConfig { +@@ -317,6 +317,7 @@ public class PurpurConfig { } public static int barrelRows = 3; @@ -254,7 +254,7 @@ index 234f123959830cc2adb78b9dc8752906140e5b11..e0dceff32b47b334ddcb76271e3cf3ea public static boolean enderChestSixRows = false; public static boolean enderChestPermissionRows = false; public static boolean cryingObsidianValidForPortalFrame = false; -@@ -365,6 +366,7 @@ public class PurpurConfig { +@@ -360,6 +361,7 @@ public class PurpurConfig { case 1 -> 9; default -> 27; }); @@ -263,7 +263,7 @@ index 234f123959830cc2adb78b9dc8752906140e5b11..e0dceff32b47b334ddcb76271e3cf3ea org.bukkit.event.inventory.InventoryType.ENDER_CHEST.setDefaultSize(enderChestSixRows ? 54 : 27); enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows); diff --git a/org/purpurmc/purpur/PurpurWorldConfig.java b/org/purpurmc/purpur/PurpurWorldConfig.java -index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86baa2b5df 100644 +index c432874257451b62fde4284526a647736fa3bcd0..d427575e389b7c249799d71aa953e8419530a9ce 100644 --- a/org/purpurmc/purpur/PurpurWorldConfig.java +++ b/org/purpurmc/purpur/PurpurWorldConfig.java @@ -1189,12 +1189,20 @@ public class PurpurWorldConfig { @@ -353,7 +353,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean ghastRidable = false; -@@ -2918,6 +2952,10 @@ public class PurpurWorldConfig { +@@ -2941,6 +2975,10 @@ public class PurpurWorldConfig { public double snifferMaxHealth = 14.0D; public double snifferScale = 1.0D; public int snifferBreedingTicks = 6000; @@ -364,7 +364,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 private void snifferSettings() { snifferRidable = getBoolean("mobs.sniffer.ridable", snifferRidable); snifferRidableInWater = getBoolean("mobs.sniffer.ridable-in-water", snifferRidableInWater); -@@ -2925,6 +2963,10 @@ public class PurpurWorldConfig { +@@ -2948,6 +2986,10 @@ public class PurpurWorldConfig { snifferMaxHealth = getDouble("mobs.sniffer.attributes.max_health", snifferMaxHealth); snifferScale = Mth.clamp(getDouble("mobs.sniffer.attributes.scale", snifferScale), 0.0625D, 16.0D); snifferBreedingTicks = getInt("mobs.sniffer.breeding-delay-ticks", snifferBreedingTicks); @@ -375,7 +375,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean squidRidable = false; -@@ -3026,10 +3068,20 @@ public class PurpurWorldConfig { +@@ -3049,10 +3091,20 @@ public class PurpurWorldConfig { public boolean tadpoleRidable = false; public boolean tadpoleRidableInWater = true; public boolean tadpoleControllable = true; @@ -396,7 +396,7 @@ index 21765347d7a81f4111f23685f699286d5e5cccb6..8459f5b9bf548e51b85e753a4e65dd86 } public boolean traderLlamaRidable = false; -@@ -3263,10 +3315,20 @@ public class PurpurWorldConfig { +@@ -3286,10 +3338,20 @@ public class PurpurWorldConfig { public boolean wardenRidable = false; public boolean wardenRidableInWater = true; public boolean wardenControllable = true; diff --git a/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch b/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch index 31cdb852..db472574 100644 --- a/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch +++ b/leaf-server/minecraft-patches/features/0126-SparklyPaper-Skip-distanceToSqr-call-in-ServerEntity.patch @@ -11,10 +11,10 @@ The "distanceToSqr" call is a bit expensive, so avoiding it is pretty nice, arou We could also check if the x,y,z coordinates are equal, but for now, let's just keep the identity check, which also helps us since Minecraft's code does reuse the original delta movement Vec3 object diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index 7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec..b3fe9ea70148cdbefbdb617abaf81fe48ee26685 100644 +index b7581796dda77bca66c03e421f2a83a920f44ef1..4859433b0a4160e7ee0af4c2e750956f6ca07649 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -211,6 +211,7 @@ public class ServerEntity { +@@ -215,6 +215,7 @@ public class ServerEntity { if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity)this.entity).isFallFlying()) { Vec3 deltaMovement = this.entity.getDeltaMovement(); @@ -22,7 +22,7 @@ index 7fe21b10eefce56dde19baebf9cb6d2d0a8d73ec..b3fe9ea70148cdbefbdb617abaf81fe4 double d = deltaMovement.distanceToSqr(this.lastSentMovement); if (d > 1.0E-7 || d > 0.0 && deltaMovement.lengthSqr() == 0.0) { this.lastSentMovement = deltaMovement; -@@ -228,6 +229,7 @@ public class ServerEntity { +@@ -232,6 +233,7 @@ public class ServerEntity { this.broadcast.accept(new ClientboundSetEntityMotionPacket(this.entity.getId(), this.lastSentMovement)); } } diff --git a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch b/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch index 328fa224..2ffeccb1 100644 --- a/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch +++ b/leaf-server/minecraft-patches/features/0128-SparklyPaper-Skip-EntityScheduler-s-executeTick-chec.patch @@ -13,18 +13,18 @@ To avoid the hefty ArrayDeque's size() call, we check if we *really* need to exe Most entities won't have any scheduled tasks, so this is a nice performance bonus. These optimizations, however, wouldn't work in a Folia environment, but because in SparklyPaper executeTick is always executed on the main thread, it ain't an issue for us (yay). diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index ee07832a92b3f73bd85d13388276cf224743c0ed..2ecda6d2af7721113384c11d4a96a3b3cb082232 100644 +index 1635de2b25a4162036522615424d9e845def6258..5cb1f2246a590d4420b73538e7c4a9f4083a11ab 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop entitiesWithScheduledTasks = java.util.concurrent.ConcurrentHashMap.newKeySet(); // SparklyPaper - skip EntityScheduler's executeTick checks if there isn't any tasks to be run (concurrent because plugins may schedule tasks async) public static S spin(Function threadFunction) { - AtomicReference atomicReference = new AtomicReference<>(); -@@ -1663,6 +1664,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { for (final net.minecraft.world.entity.Entity entity : level.getEntities().getAll()) { if (entity.isRemoved()) { -@@ -1674,6 +1691,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0 ? split[0] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListPrefix, ""); String suffix = (split.length > 1 ? split[1] : "").replace(org.purpurmc.purpur.PurpurConfig.afkTabListSuffix, ""); if (afk) { @@ -53,10 +53,10 @@ index f3fb661e2cbf8119264d113a06bcb7bb5150be91..034a946cd545d775188a4375a87c90d2 } else { getBukkitEntity().setPlayerListName(prefix + scoreboardName + suffix, true); diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca053de70958 100644 +index 8e0e119b41ca1e49d7e3f7874c5fb3c2b434e737..8f9547083eb64a5ab93407725a8f4afcb23c5e23 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2327,6 +2327,7 @@ public class ServerGamePacketListenerImpl +@@ -2361,6 +2361,7 @@ public class ServerGamePacketListenerImpl @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { @@ -64,7 +64,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 this.tryHandleChat(packet.command(), () -> { // CraftBukkit start - SPIGOT-7346: Prevent disconnected players from executing commands if (this.player.hasDisconnected()) { -@@ -2335,7 +2336,7 @@ public class ServerGamePacketListenerImpl +@@ -2369,7 +2370,7 @@ public class ServerGamePacketListenerImpl // CraftBukkit end this.performUnsignedChatCommand(packet.command()); this.detectRateSpam("/" + packet.command()); // Spigot @@ -73,7 +73,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 } private void performUnsignedChatCommand(String command) { -@@ -2368,6 +2369,7 @@ public class ServerGamePacketListenerImpl +@@ -2402,6 +2403,7 @@ public class ServerGamePacketListenerImpl public void handleSignedChatCommand(ServerboundChatCommandSignedPacket packet) { Optional optional = this.unpackAndApplyLastSeen(packet.lastSeenMessages()); if (!optional.isEmpty()) { @@ -81,7 +81,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 this.tryHandleChat(packet.command(), () -> { // CraftBukkit start - SPIGOT-7346: Prevent disconnected players from executing commands if (this.player.hasDisconnected()) { -@@ -2376,7 +2378,7 @@ public class ServerGamePacketListenerImpl +@@ -2410,7 +2412,7 @@ public class ServerGamePacketListenerImpl // CraftBukkit end this.performSignedChatCommand(packet, optional.get()); this.detectRateSpam("/" + packet.command()); // Spigot @@ -90,7 +90,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 } } -@@ -2483,12 +2485,17 @@ public class ServerGamePacketListenerImpl +@@ -2517,12 +2519,17 @@ public class ServerGamePacketListenerImpl return dispatcher.parse(command, this.player.createCommandSourceStack()); } @@ -110,7 +110,7 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 this.player.resetLastActionTime(); // CraftBukkit start if (sync) { -@@ -2500,6 +2507,40 @@ public class ServerGamePacketListenerImpl +@@ -2534,6 +2541,40 @@ public class ServerGamePacketListenerImpl } } @@ -152,19 +152,19 @@ index 0bf9ead58e256dccd3c1e89bd08ebae9d630b49e..3c14d32ec9caf3dba9d99afe86a3ca05 synchronized (this.lastSeenMessages) { Optional var10000; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 33962beef40e9dcaf09d096735c7966b146665ab..5d8b445d5b2762b2266c3e12b3423b9c2044ac7d 100644 +index 80cb09f072735e59611476c9b4641f49bfef17f5..d7bf448b7665c8776ad28310c0bf2443811ffce3 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -673,6 +673,7 @@ public abstract class PlayerList { +@@ -676,6 +676,7 @@ public abstract class PlayerList { org.leavesmc.leaves.protocol.core.LeavesProtocolManager.handlePlayerLeave(player); // Leaves - protocol // Paper end - Fix kick event leave message not being sent org.purpurmc.purpur.task.BossBarTask.removeFromAll(player.getBukkitEntity()); // Purpur - Implement TPSBar + net.minecraft.server.network.ServerGamePacketListenerImpl.afkCooldown.remove(player.getBukkitEntity().getUniqueId()); // Leaf - Improve Purpur AFK system - ServerLevel serverLevel = player.serverLevel(); + ServerLevel serverLevel = player.level(); player.awardStat(Stats.LEAVE_GAME); // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it diff --git a/org/purpurmc/purpur/PurpurConfig.java b/org/purpurmc/purpur/PurpurConfig.java -index e0dceff32b47b334ddcb76271e3cf3ea0d27e5f1..ba206b753afe26a5b4c6a2fd1fc438d9a581c3dc 100644 +index 31450de492fbfdd83608ae668072bebd525db566..b83b4536ac756b797f6f2d14886372f01e91145c 100644 --- a/org/purpurmc/purpur/PurpurConfig.java +++ b/org/purpurmc/purpur/PurpurConfig.java @@ -175,6 +175,11 @@ public class PurpurConfig { diff --git a/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch b/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch index 00607b62..a9abcf09 100644 --- a/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch +++ b/leaf-server/minecraft-patches/features/0135-Virtual-thread-for-chat-executor.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Virtual thread for chat executor diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 2ecda6d2af7721113384c11d4a96a3b3cb082232..7f6dac89c98132645799b7976b972bf43f475fe8 100644 +index 5cb1f2246a590d4420b73538e7c4a9f4083a11ab..385762df2014af0a643fb955d39871b818dde4ef 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -2663,7 +2663,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop void writeJsonWithCodec(Codec codec, T value, int maxLength) { // Paper end - Adventure; add max length parameter DataResult dataResult = codec.encodeStart(JsonOps.INSTANCE, value); @@ -59,7 +59,7 @@ index b5afc05924ae899e020c303c8b86398e1d4ab8a0..73c2ed488c34cddbafdcbb6f2636264e } diff --git a/net/minecraft/network/protocol/status/ServerStatus.java b/net/minecraft/network/protocol/status/ServerStatus.java -index 094d1821d298fc228270b2d6cf0445949434f3e2..21334ae4764740e5cf1382726d5f5231fa220d5d 100644 +index a491be4250de3199c3e1aa9e5482b568692bd2f5..5db038df25a1b5bf2f7395464250dc0bbf8d8241 100644 --- a/net/minecraft/network/protocol/status/ServerStatus.java +++ b/net/minecraft/network/protocol/status/ServerStatus.java @@ -23,7 +23,10 @@ public record ServerStatus( @@ -91,7 +91,7 @@ index 094d1821d298fc228270b2d6cf0445949434f3e2..21334ae4764740e5cf1382726d5f5231 public record Favicon(byte[] iconBytes) { diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index cdfb9004dd4f4ea1bbb77895b7fc020d628c485d..54910c2e1d6e6bb556e536fda060bd09402e04e8 100644 +index 69880a8d52f60ac3a5e5cf1ccf0654f26d456812..5af545d4ad93bcd2a9dce7035d750bb19da0f3b2 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -616,6 +616,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -103,10 +103,10 @@ index cdfb9004dd4f4ea1bbb77895b7fc020d628c485d..54910c2e1d6e6bb556e536fda060bd09 // Paper start - Add setting for proxy online mode status return properties.enforceSecureProfile diff --git a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 4d48ffeecba7fc4b53dad5f0a4d9c1bb8eac50c1..18f0d486c478087f404d8bb6cd840079e2c8d239 100644 +index 682dd82394ee6e9ad22d5592b2c6e41f5990644e..742ce07b527449f047bf162aadecdc2c4da9b3ba 100644 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -@@ -328,10 +328,30 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack +@@ -336,10 +336,30 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack } public void send(Packet packet) { @@ -125,10 +125,10 @@ index 4d48ffeecba7fc4b53dad5f0a4d9c1bb8eac50c1..18f0d486c478087f404d8bb6cd840079 this.send(packet, null); } - public void send(Packet packet, @Nullable PacketSendListener listener) { + public void send(Packet packet, @Nullable ChannelFutureListener channelFutureListener) { + // Leaf start - Mirai - Configurable chat message signatures + if (!org.dreeam.leaf.config.modules.network.ChatMessageSignature.enabled) { -+ if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat && listener != null) { ++ if (packet instanceof net.minecraft.network.protocol.game.ClientboundPlayerChatPacket chat && channelFutureListener != null) { + this.send(chat); + return; + } @@ -138,10 +138,10 @@ index 4d48ffeecba7fc4b53dad5f0a4d9c1bb8eac50c1..18f0d486c478087f404d8bb6cd840079 if (packet == null || this.processedDisconnect) { // Spigot return; diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 5d8b445d5b2762b2266c3e12b3423b9c2044ac7d..a829c7b293be5ddc5165a86df1251b10fd6f8650 100644 +index d7bf448b7665c8776ad28310c0bf2443811ffce3..04d9501f5496f8557d289c04a818dfc0f91c0d2c 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1538,7 +1538,7 @@ public abstract class PlayerList { +@@ -1534,7 +1534,7 @@ public abstract class PlayerList { public void broadcastChatMessage(PlayerChatMessage message, Predicate shouldFilterMessageTo, @Nullable ServerPlayer sender, ChatType.Bound boundChatType, @Nullable Function unsignedFunction) { // Paper end boolean flag = this.verifyChatTrusted(message); @@ -150,7 +150,7 @@ index 5d8b445d5b2762b2266c3e12b3423b9c2044ac7d..a829c7b293be5ddc5165a86df1251b10 OutgoingChatMessage outgoingChatMessage = OutgoingChatMessage.create(message); boolean flag1 = false; -@@ -1563,6 +1563,7 @@ public abstract class PlayerList { +@@ -1559,6 +1559,7 @@ public abstract class PlayerList { } public boolean verifyChatTrusted(PlayerChatMessage message) { diff --git a/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch b/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch index 2452640d..760f4b9a 100644 --- a/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch +++ b/leaf-server/minecraft-patches/features/0139-Matter-Secure-Seed.patch @@ -13,10 +13,10 @@ Co-authored-by: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Co-authored-by: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> diff --git a/net/minecraft/server/dedicated/DedicatedServerProperties.java b/net/minecraft/server/dedicated/DedicatedServerProperties.java -index 5748658abf0b90812005ae9d426df92daf5532f0..4a0eed7d7645ed539857592d233214e9a74499f1 100644 +index b286dc17cda16fca3af9374d2a4a8bd137c24450..72028edf5bbe8094779139c4a52da2a95fef10e8 100644 --- a/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/net/minecraft/server/dedicated/DedicatedServerProperties.java -@@ -114,7 +114,17 @@ public class DedicatedServerProperties extends Settings GsonHelper.parse(!property.isEmpty() ? property : "{}"), new JsonObject()), this.get("level-type", property -> property.toLowerCase(Locale.ROOT), WorldPresets.NORMAL.location().toString()) diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index e67196b815dad6baa823822285cff83848e549ce..ac7b4625ed9ec94ca438b6fedcd3e6bb6414b157 100644 +index 4979171c8da6f366aab636fb3058ca457fe75061..91574985958950dffe0f393d7dfac4818af3b151 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java -@@ -674,6 +674,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon +@@ -675,6 +675,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon } public ChunkGenerator getGenerator() { @@ -48,10 +48,10 @@ index e67196b815dad6baa823822285cff83848e549ce..ac7b4625ed9ec94ca438b6fedcd3e6bb } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 9b193bf81cf7f9f45dfa207a826043e083c2f8ba..11e8738b7cf388e0742bfe5e6136365f6ac066f9 100644 +index 2cf0fa70ae3d7675cac3cf7a0002097b4e773fe1..d57a3a9b8ebd2f5d381336a0b5e81d71e2de6530 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -625,6 +625,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -628,6 +628,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe chunkGenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkGenerator, gen); } // CraftBukkit end @@ -60,10 +60,10 @@ index 9b193bf81cf7f9f45dfa207a826043e083c2f8ba..11e8738b7cf388e0742bfe5e6136365f DataFixer fixerUpper = server.getFixerUpper(); // Paper - rewrite chunk system diff --git a/net/minecraft/world/entity/monster/Slime.java b/net/minecraft/world/entity/monster/Slime.java -index 9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c..c257a19ff6b15ee6a83e9c946e2b20309ada9b51 100644 +index b299fc08fe900b4d48ce3e6986bcea000253053e..2885d4271405409ad2a681ea13aadf383a3520ca 100644 --- a/net/minecraft/world/entity/monster/Slime.java +++ b/net/minecraft/world/entity/monster/Slime.java -@@ -412,7 +412,11 @@ public class Slime extends Mob implements Enemy { +@@ -413,7 +413,11 @@ public class Slime extends Mob implements Enemy { } ChunkPos chunkPos = new ChunkPos(pos); @@ -77,10 +77,10 @@ index 9a157a2bdbbeab89dbfcd23be8bdc62c8de4548c..c257a19ff6b15ee6a83e9c946e2b2030 final double maxHeightSlimeChunk = level.getMinecraftWorld().paperConfig().entities.spawning.slimeSpawnHeight.slimeChunk.maximum; if (random.nextInt(10) == 0 && flag && pos.getY() < maxHeightSlimeChunk) { diff --git a/net/minecraft/world/level/chunk/ChunkAccess.java b/net/minecraft/world/level/chunk/ChunkAccess.java -index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..6683df8d0f5a61ab094393f761a3d3a22d6e0455 100644 +index 182c14b660f8860bed627eed4e01fd4002153e9a..686c031ec73acc80683aaa39a78fe9221f0215a6 100644 --- a/net/minecraft/world/level/chunk/ChunkAccess.java +++ b/net/minecraft/world/level/chunk/ChunkAccess.java -@@ -87,6 +87,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -88,6 +88,10 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(ChunkAccess.DATA_TYPE_REGISTRY); // CraftBukkit end public final Registry biomeRegistry; // CraftBukkit @@ -91,7 +91,7 @@ index 3b7f0d5fe40bdda65ab859a0c22bf0d369dc0f01..6683df8d0f5a61ab094393f761a3d3a2 // Paper start - rewrite chunk system private volatile ca.spottedleaf.moonrise.patches.starlight.light.SWMRNibbleArray[] blockNibbles; -@@ -191,6 +195,17 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh +@@ -192,6 +196,17 @@ public abstract class ChunkAccess implements BiomeManager.NoiseBiomeSource, Ligh return GameEventListenerRegistry.NOOP; } diff --git a/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch b/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch index e612d244..25980dd3 100644 --- a/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch +++ b/leaf-server/minecraft-patches/features/0140-Matter-Secure-Seed-command.patch @@ -7,24 +7,22 @@ Original license: GPLv3 Original project: https://github.com/plasmoapp/matter diff --git a/net/minecraft/server/commands/SeedCommand.java b/net/minecraft/server/commands/SeedCommand.java -index a65affc41a4fc299bc2281f0f53f2e075633899d..18dd6fa908104ea9fbb32faaca0725d4d6849b09 100644 +index 7c1e18d8362be5ae885c32b05e98b9ef45942d93..e54ed64059956555767c0c01057a8319e671b1d2 100644 --- a/net/minecraft/server/commands/SeedCommand.java +++ b/net/minecraft/server/commands/SeedCommand.java -@@ -12,6 +12,17 @@ public class SeedCommand { - long seed = context.getSource().getLevel().getSeed(); +@@ -12,6 +12,15 @@ public class SeedCommand { + long seed = commandContext.getSource().getLevel().getSeed(); Component component = ComponentUtils.copyOnClickText(String.valueOf(seed)); - context.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false); -+ + commandContext.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false); + // Leaf start - Matter - Secure Seed command + if (org.dreeam.leaf.config.modules.misc.SecureSeed.enabled) { -+ su.plo.matter.Globals.setupGlobals(context.getSource().getLevel()); ++ su.plo.matter.Globals.setupGlobals(commandContext.getSource().getLevel()); + String seedStr = su.plo.matter.Globals.seedToString(su.plo.matter.Globals.worldSeed); + Component featureSeedComponent = ComponentUtils.copyOnClickText(seedStr); + -+ context.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false); ++ commandContext.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false); + } + // Leaf end - Matter - Secure Seed command -+ return (int)seed; })); } diff --git a/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch b/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch index 5a3bac6e..22117b17 100644 --- a/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch +++ b/leaf-server/minecraft-patches/features/0141-Faster-random-generator.patch @@ -14,7 +14,7 @@ ThreadUnsafeRandom (Moonrise): 102,265,100 ns SimpleThreadUnsafeRandom (Moonrise): 97,054,600 ns diff --git a/net/minecraft/server/level/ServerChunkCache.java b/net/minecraft/server/level/ServerChunkCache.java -index ac7b4625ed9ec94ca438b6fedcd3e6bb6414b157..6d5a15122079f2d1568ceb7086db21ad454f58e6 100644 +index 91574985958950dffe0f393d7dfac4818af3b151..eaaa66c4d86d4ebda0acf8f1dbe8ecb55aa28285 100644 --- a/net/minecraft/server/level/ServerChunkCache.java +++ b/net/minecraft/server/level/ServerChunkCache.java @@ -154,7 +154,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon @@ -27,10 +27,10 @@ index ac7b4625ed9ec94ca438b6fedcd3e6bb6414b157..6d5a15122079f2d1568ceb7086db21ad final ServerLevel world = this.level; final int randomTickSpeed = world.getGameRules().getInt(GameRules.RULE_RANDOMTICKING); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 11e8738b7cf388e0742bfe5e6136365f6ac066f9..16cafa0acb7b2972ce08ab56921e73eb44eff6fa 100644 +index d57a3a9b8ebd2f5d381336a0b5e81d71e2de6530..08d12a1acc3a672a77daa15f82392cd603c30283 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -891,7 +891,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -895,7 +895,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private void optimiseRandomTick(final LevelChunk chunk, final int tickSpeed) { final LevelChunkSection[] sections = chunk.getSections(); final int minSection = ca.spottedleaf.moonrise.common.util.WorldUtil.getMinSection((ServerLevel)(Object)this); @@ -39,7 +39,7 @@ index 11e8738b7cf388e0742bfe5e6136365f6ac066f9..16cafa0acb7b2972ce08ab56921e73eb final boolean doubleTickFluids = !ca.spottedleaf.moonrise.common.PlatformHooks.get().configFixMC224294(); final ChunkPos cpos = chunk.getPos(); -@@ -940,7 +940,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -944,7 +944,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe private int currentIceAndSnowTick = 0; protected void resetIceAndSnowTick() { this.currentIceAndSnowTick = this.simpleRandom.nextInt(16); } // Gale - Airplane - optimize random calls in chunk ticking public void tickChunk(LevelChunk chunk, int randomTickSpeed) { @@ -97,10 +97,10 @@ index 8516d47b0ba79d91638837199e7ae0fb6cb44a79..4f4b55dd099dd2c2fea118b18b535881 RandomSource fork(); diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa..ddaaf29305a9cdb6dcccd38d4ec37fac6f0a1a51 100644 +index 305181410e025d857608c866592bcc44e3654f31..f49bfe0bbb8d8373bd7a11fa3c1a828a46da6a4b 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -149,7 +149,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -155,7 +155,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess } // Paper start - Share random for entities to make them more random @@ -110,7 +110,7 @@ index d4a7cabf25b3ba2b085c68a3a7ed73a072c5e7fa..ddaaf29305a9cdb6dcccd38d4ec37fac private static final class RandomRandomSource extends ca.spottedleaf.moonrise.common.util.ThreadUnsafeRandom { public RandomRandomSource() { diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index 9ac2ecb78f6214616376b0e3badef21dc3f72114..f145453f70a219c1be33b241309ae2ab22a8004b 100644 +index 3bd42eb81eae3af9323021a5dc6edaa06dfcaead..8ebfb2f5cf439190ea9bd4ad81d737fbcd4514c2 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -117,7 +117,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup, AutoCl diff --git a/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch b/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch index b8c6533c..9a5c8158 100644 --- a/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch +++ b/leaf-server/minecraft-patches/features/0143-Don-t-save-falling-block-entity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't save falling block entity diff --git a/net/minecraft/world/entity/item/FallingBlockEntity.java b/net/minecraft/world/entity/item/FallingBlockEntity.java -index 31edd0d45ac6c38887e4cebffe5a7cf377b47466..149d5845480c03fe4e29b09cac7fcd1bec147507 100644 +index 595dee03e3a7d98d703e48fb53d82d7f392a2b3d..c99ddedaf25a009f0d19f97d01e7545b0c59aee2 100644 --- a/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -385,4 +385,11 @@ public class FallingBlockEntity extends Entity { +@@ -390,4 +390,11 @@ public class FallingBlockEntity extends Entity { this.forceTickAfterTeleportToDuplicate = entity != null && flag && io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.allowUnsafeEndPortalTeleportation; // Paper return entity; } diff --git a/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch b/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch index d978ce03..a056e1aa 100644 --- a/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch +++ b/leaf-server/minecraft-patches/features/0144-Configurable-connection-message.patch @@ -5,28 +5,28 @@ Subject: [PATCH] Configurable connection message diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index a829c7b293be5ddc5165a86df1251b10fd6f8650..8b7b60e2f143dcbb44f3084c3c4d2306b9708f0d 100644 +index 04d9501f5496f8557d289c04a818dfc0f91c0d2c..3cf5b85c48c0f77b833e35fcc49fab382565ca4f 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -438,7 +438,7 @@ public abstract class PlayerList { - // Ensure that player inventory is populated with its viewer - player.containerMenu.transferTo(player.containerMenu, bukkitPlayer); +@@ -439,7 +439,7 @@ public abstract class PlayerList { + // Ensure that player inventory is populated with its viewer + player.containerMenu.transferTo(player.containerMenu, bukkitPlayer); -- org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, io.papermc.paper.adventure.PaperAdventure.asAdventure(mutableComponent)); // Paper - Adventure +- org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, io.papermc.paper.adventure.PaperAdventure.asAdventure(mutableComponent)); // Paper - Adventure + org.bukkit.event.player.PlayerJoinEvent playerJoinEvent = new org.bukkit.event.player.PlayerJoinEvent(bukkitPlayer, getJoinMsg(mutableComponent, bukkitPlayer)); // Paper - Adventure // Leaf - Configurable connection message - join message - this.cserver.getPluginManager().callEvent(playerJoinEvent); + this.cserver.getPluginManager().callEvent(playerJoinEvent); - if (!player.connection.isAcceptingMessages()) { -@@ -452,7 +452,7 @@ public abstract class PlayerList { + if (!player.connection.isAcceptingMessages()) { +@@ -453,7 +453,7 @@ public abstract class PlayerList { - final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); + final net.kyori.adventure.text.Component jm = playerJoinEvent.joinMessage(); -- if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure +- if (jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure + if (org.dreeam.leaf.config.modules.misc.ConnectionMessage.joinEnabled && jm != null && !jm.equals(net.kyori.adventure.text.Component.empty())) { // Paper - Adventure // Leaf - Configurable connection message - join message - joinMessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(jm); // Paper - Adventure - this.server.getPlayerList().broadcastSystemMessage(joinMessage, false); // Paper - Adventure - } -@@ -682,7 +682,7 @@ public abstract class PlayerList { + joinMessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(jm); // Paper - Adventure + this.server.getPlayerList().broadcastSystemMessage(joinMessage, false); // Paper - Adventure + } +@@ -685,7 +685,7 @@ public abstract class PlayerList { player.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason } @@ -35,7 +35,7 @@ index a829c7b293be5ddc5165a86df1251b10fd6f8650..8b7b60e2f143dcbb44f3084c3c4d2306 this.cserver.getPluginManager().callEvent(playerQuitEvent); player.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); -@@ -1691,4 +1691,40 @@ public abstract class PlayerList { +@@ -1687,4 +1687,40 @@ public abstract class PlayerList { public boolean isAllowCommandsForAllPlayers() { return this.allowCommandsForAllPlayers; } diff --git a/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch b/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch index 6385c426..3e445fd1 100644 --- a/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch +++ b/leaf-server/minecraft-patches/features/0145-Configurable-unknown-command-message.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable unknown command message diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b11aa95552 100644 +index db5318350988ad23f01a5a43d59090768a682fea..b30c69be528458792798724a1c6f7205785537bd 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -403,31 +403,8 @@ public class Commands { +@@ -438,31 +438,8 @@ public class Commands { // Paper start - Add UnknownCommandEvent final net.kyori.adventure.text.TextComponent.Builder builder = net.kyori.adventure.text.Component.text(); // source.sendFailure(ComponentUtils.fromMessage(var7.getRawMessage())); @@ -41,7 +41,7 @@ index 54cc28bb1693be2077cb30d1dc85f9ae24a6c954..1e84f726f23877ed4be1aa901d7df0b1 org.bukkit.Bukkit.getServer().getPluginManager().callEvent(event); if (event.message() != null) { source.sendFailure(io.papermc.paper.adventure.PaperAdventure.asVanilla(event.message()), false); -@@ -678,6 +655,92 @@ public class Commands { +@@ -696,6 +673,92 @@ public class Commands { }; } diff --git a/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch b/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch index eb2dd953..274d4b32 100644 --- a/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch +++ b/leaf-server/minecraft-patches/features/0147-Remove-stream-in-entity-visible-effects-filter.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stream in entity visible effects filter diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 09aa0b344aff0c48eec9a296d47c0704bd0fdc5c..fdbe3d4d71ba30c8330760555e97ff436643a7a9 100644 +index 97098f05dda8a46716162dd0330ca60d30814999..1d60ff59942680e9993d875505db0dfb8d7a5f96 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -988,12 +988,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1013,12 +1013,15 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } private void updateSynchronizedMobEffectParticles() { diff --git a/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch b/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch index c469f856..3a0d3410 100644 --- a/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch +++ b/leaf-server/minecraft-patches/features/0149-Remove-stream-in-trial-spawner-ticking.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Remove stream in trial spawner ticking diff --git a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java -index 6b3d92e76a16358c89ee07e1970c764ba4a8e2dc..5edc7278387c3fc61909582ebf34e905abc68fc4 100644 +index 3e3380dfe8fde979f0d843813583d6f07efb96c4..f4b092e3c81f692aa4632e116960e71eb084bdc8 100644 --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerState.java @@ -173,17 +173,21 @@ public enum TrialSpawnerState implements StringRepresentable { } - private static Optional calculatePositionToSpawnSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner, TrialSpawnerData spawnerData) { -- List list = spawnerData.detectedPlayers + private static Optional calculatePositionToSpawnSpawner(ServerLevel level, BlockPos pos, TrialSpawner spawner, TrialSpawnerStateData data) { +- List list = data.detectedPlayers - .stream() - .map(level::getPlayerByUUID) - .filter(Objects::nonNull) @@ -26,7 +26,7 @@ index 6b3d92e76a16358c89ee07e1970c764ba4a8e2dc..5edc7278387c3fc61909582ebf34e905 + // Leaf start - Remove stream in trial spawner ticking + List list = new java.util.ArrayList<>(); + -+ for (UUID uuid : spawnerData.detectedPlayers) { ++ for (UUID uuid : data.detectedPlayers) { + Player player = level.getPlayerByUUID(uuid); + + if (player != null @@ -78,4 +78,4 @@ index 6b3d92e76a16358c89ee07e1970c764ba4a8e2dc..5edc7278387c3fc61909582ebf34e905 + // Leaf end - Remove stream in trial spawner ticking } - private boolean timeToSpawnItemSpawner(ServerLevel level, TrialSpawnerData spawnerData) { + private boolean timeToSpawnItemSpawner(ServerLevel level, TrialSpawnerStateData data) { diff --git a/leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch b/leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch index ad605797..6b0369b4 100644 --- a/leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch +++ b/leaf-server/minecraft-patches/features/0156-Remove-stream-in-updateFluidOnEyes.patch @@ -46,10 +46,10 @@ index 6c7edbbf3935c40ccb78bee680ea75431718b9bd..a1b4dc70d555cce5e06c0298736d8b89 public String toString() { return "Reference{" + this.key + "=" + this.value + "}"; diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java -index ddaaf29305a9cdb6dcccd38d4ec37fac6f0a1a51..c6bb3d9e1e9c2b38845e70c308fad41c813c600e 100644 +index f49bfe0bbb8d8373bd7a11fa3c1a828a46da6a4b..083d078f569aebbed1ab586ec99709e7c38e13b6 100644 --- a/net/minecraft/world/entity/Entity.java +++ b/net/minecraft/world/entity/Entity.java -@@ -1980,7 +1980,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess +@@ -2050,7 +2050,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess FluidState fluidState = this.level().getFluidState(blockPos); double d = blockPos.getY() + fluidState.getHeight(this.level(), blockPos); if (d > eyeY) { diff --git a/leaf-server/minecraft-patches/features/0159-Replace-Entity-active-effects-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0159-Replace-Entity-active-effects-map-with-optimized-col.patch index 76b8291e..c39d1693 100644 --- a/leaf-server/minecraft-patches/features/0159-Replace-Entity-active-effects-map-with-optimized-col.patch +++ b/leaf-server/minecraft-patches/features/0159-Replace-Entity-active-effects-map-with-optimized-col.patch @@ -6,11 +6,11 @@ Subject: [PATCH] Replace Entity active effects map with optimized collection Dreeam TODO: check this diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index fdbe3d4d71ba30c8330760555e97ff436643a7a9..ba6d9a5df71e9aae9defedf5bbe12f49599123cb 100644 +index 1d60ff59942680e9993d875505db0dfb8d7a5f96..6f5b160cae3a0f95f15a38d65a9f0515c00f87ba 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -196,6 +196,10 @@ public abstract class LivingEntity extends Entity implements Attackable { - }; +@@ -208,6 +208,10 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin + private static final Dynamic EMPTY_BRAIN = new Dynamic<>(JavaOps.INSTANCE, Map.of("memories", Map.of())); private final AttributeMap attributes; public CombatTracker combatTracker = new CombatTracker(this); + // Need to figure out the difference of mem access pattern between hash map and obj2obj hash map (separate chaining vs open addressing) @@ -20,7 +20,7 @@ index fdbe3d4d71ba30c8330760555e97ff436643a7a9..ba6d9a5df71e9aae9defedf5bbe12f49 public final Map, MobEffectInstance> activeEffects = Maps.newHashMap(); private final Map lastEquipmentItems = Util.makeEnumMap(EquipmentSlot.class, slot -> ItemStack.EMPTY); public boolean swinging; -@@ -990,15 +994,16 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1015,15 +1019,16 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin private void updateSynchronizedMobEffectParticles() { // Leaf start - Remove stream in entity visible effects filter List list = new java.util.ArrayList<>(); diff --git a/leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch b/leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch index 5651cb40..5fc7c252 100644 --- a/leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch +++ b/leaf-server/minecraft-patches/features/0163-Use-caffeine-cache-for-kickPermission-instead-of-usi.patch @@ -23,10 +23,10 @@ See the License for the specific language governing permissions and limitations under the License. diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3c14d32ec9caf3dba9d99afe86a3ca053de70958..155e2047659111f68e27d3517e5178afa233dfe4 100644 +index 8f9547083eb64a5ab93407725a8f4afcb23c5e23..170ffd6ded953005951f38d02c3124cc86a9c821 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -325,17 +325,12 @@ public class ServerGamePacketListenerImpl +@@ -328,17 +328,12 @@ public class ServerGamePacketListenerImpl public final org.leavesmc.leaves.protocol.syncmatica.exchange.ExchangeTarget exchangeTarget; // Leaves - Syncmatica Protocol // Purpur start - AFK API @@ -48,7 +48,7 @@ index 3c14d32ec9caf3dba9d99afe86a3ca053de70958..155e2047659111f68e27d3517e5178af // Purpur end - AFK API @Override -@@ -398,7 +393,7 @@ public class ServerGamePacketListenerImpl +@@ -401,7 +396,7 @@ public class ServerGamePacketListenerImpl && Util.getMillis() - this.player.getLastActionTime() > this.server.getPlayerIdleTimeout() * 1000L * 60L && !this.player.wonGame) { // Paper - Prevent AFK kick while watching end credits // Purpur start - AFK API this.player.setAfk(true); diff --git a/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch b/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch index c16a4e0f..f2dcf845 100644 --- a/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch +++ b/leaf-server/minecraft-patches/features/0164-Do-not-place-player-if-the-server-is-full.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Do not place player if the server is full Fix https://github.com/PaperMC/Paper/issues/10668 diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 8b7b60e2f143dcbb44f3084c3c4d2306b9708f0d..75393b9cdd564e55ba173828c2f7b40498e8ecd7 100644 +index 3cf5b85c48c0f77b833e35fcc49fab382565ca4f..31cc3575ae6579acf02490476d0e090557e28d95 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -342,6 +342,13 @@ public abstract class PlayerList { +@@ -343,6 +343,13 @@ public abstract class PlayerList { return; } // Gale end - MultiPaper - do not place player in world if kicked before being spawned in @@ -21,9 +21,9 @@ index 8b7b60e2f143dcbb44f3084c3c4d2306b9708f0d..75393b9cdd564e55ba173828c2f7b404 + } + // Leaf end - Do not place player if the server is full - copied from canPlayerLogin - org.bukkit.Location loc = ev.getSpawnLocation(); - serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); -@@ -835,7 +842,7 @@ public abstract class PlayerList { + org.bukkit.Location loc = ev.getSpawnLocation(); + serverLevel = ((org.bukkit.craftbukkit.CraftWorld) loc.getWorld()).getHandle(); +@@ -838,7 +845,7 @@ public abstract class PlayerList { // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameProfile) // ? Component.translatable("multiplayer.disconnect.server_full") // : null; diff --git a/leaf-server/minecraft-patches/features/0166-Fix-MC-200418.patch b/leaf-server/minecraft-patches/features/0166-Fix-MC-200418.patch index b7efec9d..e63efb67 100644 --- a/leaf-server/minecraft-patches/features/0166-Fix-MC-200418.patch +++ b/leaf-server/minecraft-patches/features/0166-Fix-MC-200418.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-200418 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-200418 diff --git a/net/minecraft/world/entity/monster/ZombieVillager.java b/net/minecraft/world/entity/monster/ZombieVillager.java -index ba480249c1e8813931a668a37977347a73f3a3f5..70e68d56f2d781930d877f40818d9aeb377dc8af 100644 +index 18966860f550ad1f35ec6a03a0b78af73628b964..1c75ba6c5595f0f554df2844663e8e6904055b23 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -294,6 +294,11 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -293,6 +293,11 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { if (!this.isSilent()) { level.levelEvent(null, 1027, this.blockPosition(), 0); } diff --git a/leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch b/leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch index 70853fdc..f00b0beb 100644 --- a/leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch +++ b/leaf-server/minecraft-patches/features/0167-Fix-MC-119417.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-119417 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-119417 diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 034a946cd545d775188a4375a87c90d253ebdb08..18125ed336c3425f123232b405a8af9ee3a2ba7d 100644 +index 93e6eb5f160a58351f97683f57c763e418786d1c..72cf6f83b3158c3ccf6f8b51652e6fe6401ae0e6 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2191,6 +2191,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2230,6 +2230,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.CHANGE_GAME_MODE, gameMode.getId())); if (gameMode == GameType.SPECTATOR) { this.removeEntitiesOnShoulder(); diff --git a/leaf-server/minecraft-patches/features/0168-Fix-MC-223153.patch b/leaf-server/minecraft-patches/features/0168-Fix-MC-223153.patch index 903f4fe8..93580389 100644 --- a/leaf-server/minecraft-patches/features/0168-Fix-MC-223153.patch +++ b/leaf-server/minecraft-patches/features/0168-Fix-MC-223153.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix MC-223153 Related MC issue: https://bugs.mojang.com/browse/MC/issues/MC-223153 diff --git a/net/minecraft/world/level/block/Blocks.java b/net/minecraft/world/level/block/Blocks.java -index 4941bf9df0c8ed6316572920323f7c5f6791b002..303bd27d44e4acfee49334235a6704724e3fd616 100644 +index 941c57083803d69503e83c3ccbbb2759ba3db605..57aad048034005543a72556e990b53db8deebfee 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6744,6 +6744,7 @@ public class Blocks { +@@ -6732,6 +6732,7 @@ public class Blocks { .mapColor(MapColor.COLOR_ORANGE) .instrument(NoteBlockInstrument.BASEDRUM) .requiresCorrectToolForDrops() diff --git a/leaf-server/minecraft-patches/features/0169-Configurable-player-knockback-zombie.patch b/leaf-server/minecraft-patches/features/0169-Configurable-player-knockback-zombie.patch index 5cb47f7f..c8ed06ae 100644 --- a/leaf-server/minecraft-patches/features/0169-Configurable-player-knockback-zombie.patch +++ b/leaf-server/minecraft-patches/features/0169-Configurable-player-knockback-zombie.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable player knockback zombie diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index ba6d9a5df71e9aae9defedf5bbe12f49599123cb..4c3eadc2d8480b2a2c2c08e58620544d403d3adc 100644 +index 6f5b160cae3a0f95f15a38d65a9f0515c00f87ba..6c9ce4a979c084c9024a954d8315424cb7be27c7 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -2079,6 +2079,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2111,6 +2111,8 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } public void knockback(double strength, double x, double z, @Nullable Entity attacker, io.papermc.paper.event.entity.EntityKnockbackEvent.Cause eventCause) { // Paper - knockback events @@ -17,7 +17,7 @@ index ba6d9a5df71e9aae9defedf5bbe12f49599123cb..4c3eadc2d8480b2a2c2c08e58620544d strength *= 1.0 - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE); if (true || !(strength <= 0.0)) { // CraftBukkit - Call event even when force is 0 // this.hasImpulse = true; // CraftBukkit - Move down -@@ -2109,6 +2111,20 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2141,6 +2143,20 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } } diff --git a/leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch b/leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch index ebb89416..badf2c0f 100644 --- a/leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch +++ b/leaf-server/minecraft-patches/features/0170-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch @@ -8,10 +8,10 @@ Original project: https://github.com/PaperMC/Paper Paper pull request: https://github.com/PaperMC/Paper/pull/10990 diff --git a/net/minecraft/world/entity/Mob.java b/net/minecraft/world/entity/Mob.java -index cf136bc3d0d285ebde23c6e31c002933564fdcb2..c15b6e32bd00650366dc4ecba2abeb6bfb98d638 100644 +index a6be753d1284167e090c40e6dcfbaa56b4e3d774..867353500482247bbec79f407246902c79a3d14a 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -207,6 +207,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -210,6 +210,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void inactiveTick() { super.inactiveTick(); @@ -24,10 +24,10 @@ index cf136bc3d0d285ebde23c6e31c002933564fdcb2..c15b6e32bd00650366dc4ecba2abeb6b if (this.goalSelector.inactiveTick(this.activatedPriority, true) && !isThrottled) { // Pufferfish - pass activated priroity // Pufferfish - throttle inactive goal selector ticking this.goalSelector.tick(); diff --git a/net/minecraft/world/entity/npc/Villager.java b/net/minecraft/world/entity/npc/Villager.java -index acb0789b3e791cbb81c23efb9bbeae736db5f48c..4de268c2b563dca353748e12a0f5dc0729e6fc21 100644 +index a4c474b6804020317750da06f00dcb2ec049d0b7..50d030205b2316e6ad5939ed62cc8b512338da00 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -374,7 +374,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -375,7 +375,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler if (this.getUnhappyCounter() > 0) { this.setUnhappyCounter(this.getUnhappyCounter() - 1); } diff --git a/leaf-server/minecraft-patches/features/0171-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch b/leaf-server/minecraft-patches/features/0171-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch index a322b137..d05b4ab1 100644 --- a/leaf-server/minecraft-patches/features/0171-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch +++ b/leaf-server/minecraft-patches/features/0171-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch @@ -12,10 +12,10 @@ before spawning, it checks isSpawnPositionOk() for the position which loads the This patch ensures the chunk at the random location is loaded before trying to spawn the reinforcement zombie in it. diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 447adc3dcfd31a6fb9e673555e9793a82f9e02d4..08cf959a0b96ec765f3405a0b0956932ee0a7d26 100644 +index 185d138f65e884eb9b3fdd753bc4e2a14a25c4b1..3c1bc0259634be5d988eae93d781c351ec6f3251 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -401,6 +401,13 @@ public class Zombie extends Monster { +@@ -400,6 +400,13 @@ public class Zombie extends Monster { int i2 = floor1 + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1); int i3 = floor2 + Mth.nextInt(this.random, 7, 40) * Mth.nextInt(this.random, -1, 1); BlockPos blockPos = new BlockPos(i1, i2, i3); diff --git a/leaf-server/minecraft-patches/features/0172-PaperPR-Fix-some-beacon-event-issues.patch b/leaf-server/minecraft-patches/features/0172-PaperPR-Fix-some-beacon-event-issues.patch index 982c2005..3c888b06 100644 --- a/leaf-server/minecraft-patches/features/0172-PaperPR-Fix-some-beacon-event-issues.patch +++ b/leaf-server/minecraft-patches/features/0172-PaperPR-Fix-some-beacon-event-issues.patch @@ -14,10 +14,10 @@ Moves the deactivate event call into the onRemove method for the beacon block it The field I added feels a bit wrong but it works, it's to prevent the activation event being called immediately after loading, can't see any better way to differentiate between a newly placed beacon and a newly loaded one. diff --git a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92bbfeb676 100644 +index c2e15c6e1c6bfc5a9d89afc9b8aa9551bad2cc8f..bd831e116a8e394014c1a6fe3928daf3c9bdd8b5 100644 --- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -172,6 +172,8 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -173,6 +173,8 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name return VALID_EFFECTS.contains(effect) ? effect : null; } @@ -26,7 +26,7 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 public BeaconBlockEntity(BlockPos pos, BlockState blockState) { super(BlockEntityType.BEACON, pos, blockState); } -@@ -237,10 +239,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -238,10 +240,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } // Paper start - beacon activation/deactivation events @@ -44,7 +44,7 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, pos); new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent(); } -@@ -248,10 +255,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -249,10 +256,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name if (blockEntity.lastCheckY >= height) { blockEntity.lastCheckY = level.getMinY() - 1; @@ -57,7 +57,7 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 if (!flag && flag1) { playSound(level, pos, SoundEvents.BEACON_ACTIVATE); -@@ -295,10 +302,6 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -296,10 +303,6 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @Override public void setRemoved() { @@ -68,15 +68,15 @@ index bc7b9d6faded66e95c38cfc5571b09c05af30deb..0714dd9d0136dc254687fcfe3ce56b92 // Paper start - fix MC-153086 if (this.levels > 0 && !this.beamSections.isEmpty()) { playSound(this.level, this.worldPosition, SoundEvents.BEACON_DEACTIVATE); -@@ -426,6 +429,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name - this.primaryPower = loadEffect(tag, "primary_effect"); - this.secondaryPower = loadEffect(tag, "secondary_effect"); - this.levels = tag.getIntOr("Levels", 0); // CraftBukkit - SPIGOT-5053, use where available +@@ -427,6 +430,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + this.primaryPower = loadEffect(input, "primary_effect"); + this.secondaryPower = loadEffect(input, "secondary_effect"); + this.levels = input.getIntOr("Levels", 0); // CraftBukkit - SPIGOT-5053, use where available + this.justLoadedAndPreviouslyActive = this.levels > 0; // Paper - this.name = parseCustomNameSafe(tag.get("CustomName"), registries); - this.lockKey = LockCode.fromTag(tag, registries); - this.effectRange = tag.getDoubleOr(PAPER_RANGE_TAG, -1); // Paper - Custom beacon ranges -@@ -497,4 +501,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name + this.name = parseCustomNameSafe(input, "CustomName"); + this.lockKey = LockCode.fromTag(input); + this.effectRange = input.getDoubleOr(PAPER_RANGE_TAG, -1); // Paper - Custom beacon ranges +@@ -498,4 +502,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name super.setLevel(level); this.lastCheckY = level.getMinY() - 1; } diff --git a/leaf-server/minecraft-patches/features/0173-Dont-send-useless-entity-packets.patch b/leaf-server/minecraft-patches/features/0173-Dont-send-useless-entity-packets.patch index 12564389..22ac3717 100644 --- a/leaf-server/minecraft-patches/features/0173-Dont-send-useless-entity-packets.patch +++ b/leaf-server/minecraft-patches/features/0173-Dont-send-useless-entity-packets.patch @@ -9,10 +9,10 @@ Original license: MIT Original project: https://github.com/PurpurMC/Purpur diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index d6b261f8d3fbeee771208528b3e0bd5fcd94878b..1a9601aee097b6c10cf2ae1c52fddf45da85f60f 100644 +index d605c4da4475fdc47a6d0c90fbca2713fc9d8fef..add696ec1835eb161d6fc94509a2a77febd23d69 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -221,6 +221,8 @@ public class ServerEntity { +@@ -225,6 +225,8 @@ public class ServerEntity { } // Gale end - Airplane - better checking for useless move packets @@ -21,7 +21,7 @@ index d6b261f8d3fbeee771208528b3e0bd5fcd94878b..1a9601aee097b6c10cf2ae1c52fddf45 if (this.entity.hasImpulse || this.trackDelta || this.entity instanceof LivingEntity && ((LivingEntity)this.entity).isFallFlying()) { Vec3 deltaMovement = this.entity.getDeltaMovement(); if (deltaMovement != this.lastSentMovement) { // SparklyPaper start - skip distanceToSqr call in ServerEntity#sendChanges if the delta movement hasn't changed -@@ -304,6 +306,21 @@ public class ServerEntity { +@@ -308,6 +310,21 @@ public class ServerEntity { ); } diff --git a/leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch b/leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch index 865add96..489b8d38 100644 --- a/leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch +++ b/leaf-server/minecraft-patches/features/0174-Multithreaded-Tracker.patch @@ -46,7 +46,7 @@ index 1b8193587814225c2ef2c5d9e667436eb50ff6c5..4200d22606c6a3dbdf282792a4007a51 { for (int i = 0; i < this.directByChunk.length; ++i) { diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -index 02a9ef1694c796584c29430d27f0a09047368835..32608df3da169159c070f37cb55407f4f6187744 100644 +index f3bac0906d8a1c5dea7b0dee13c5cd6fdbbcae49..673703726979562e01eea6add6942c24fd09a205 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java @@ -340,7 +340,7 @@ public final class RegionizedPlayerChunkLoader { @@ -71,7 +71,7 @@ index 9c0c99b936b4a82ebfe924866e53ec71f7bbe9ad..2ccff968cb2065d34fad4d27573f9e30 .add( new ClientboundUpdateAttributesPacket.AttributeSnapshot( diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index c60b9e4076450de2157c1a3cf4f98cc2c19e4e6a..38a43e143906f2727025696a2895eafa8a77deb6 100644 +index 74d11e8983f12f6f33fe2eb3016730507e1031d4..f621cfea59b6d2f2fb29333e50860584b7992c26 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java @@ -255,6 +255,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -356,7 +356,7 @@ index f106373ef3ac4a8685c2939c9e8361688a285913..51ae390c68e7a3aa193329cc3bc47ca6 public boolean visible = true; diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index 1a9601aee097b6c10cf2ae1c52fddf45da85f60f..16b2ca8c96e9561aa57e0903d1e98e6441044b6d 100644 +index add696ec1835eb161d6fc94509a2a77febd23d69..2b55ec55b0a5dacc0c658ae5359040ff529418c6 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java @@ -146,7 +146,7 @@ public class ServerEntity { @@ -368,7 +368,7 @@ index 1a9601aee097b6c10cf2ae1c52fddf45da85f60f..16b2ca8c96e9561aa57e0903d1e98e64 final ServerPlayer serverPlayer = connection.getPlayer(); // Paper savedData.tickCarriedBy(serverPlayer, item); Packet updatePacket = savedData.getUpdatePacket(mapId, serverPlayer); -@@ -468,7 +468,7 @@ public class ServerEntity { +@@ -462,7 +462,7 @@ public class ServerEntity { this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), attributesToSync)); } @@ -378,10 +378,10 @@ index 1a9601aee097b6c10cf2ae1c52fddf45da85f60f..16b2ca8c96e9561aa57e0903d1e98e64 } diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 16cafa0acb7b2972ce08ab56921e73eb44eff6fa..bbccf0c8aef3792bb7b7cb0070e48bca4c274a2c 100644 +index 08d12a1acc3a672a77daa15f82392cd603c30283..c5949a0e852ca6de84e8dd12e3d4ed8527b60e25 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2505,7 +2505,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2527,7 +2527,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public LevelEntityGetter getEntities() { @@ -390,7 +390,7 @@ index 16cafa0acb7b2972ce08ab56921e73eb44eff6fa..bbccf0c8aef3792bb7b7cb0070e48bca return this.moonrise$getEntityLookup(); // Paper - rewrite chunk system } -@@ -2746,7 +2746,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2799,7 +2799,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe } map.carriedByPlayers.remove(player); @@ -400,10 +400,10 @@ index 16cafa0acb7b2972ce08ab56921e73eb44eff6fa..bbccf0c8aef3792bb7b7cb0070e48bca } } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 155e2047659111f68e27d3517e5178afa233dfe4..c91348eea1350728d8f6de7b8c3613cb44b5cdec 100644 +index 170ffd6ded953005951f38d02c3124cc86a9c821..d60840837c1b609f6dffd866a582ad7ce787b916 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1881,7 +1881,7 @@ public class ServerGamePacketListenerImpl +@@ -1914,7 +1914,7 @@ public class ServerGamePacketListenerImpl } public void internalTeleport(PositionMoveRotation posMoveRotation, Set relatives) { @@ -413,10 +413,10 @@ index 155e2047659111f68e27d3517e5178afa233dfe4..c91348eea1350728d8f6de7b8c3613cb if (this.player.isRemoved()) { LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 4c3eadc2d8480b2a2c2c08e58620544d403d3adc..68241d1d488bc2848e3c0d167270c1788e573c37 100644 +index 6c9ce4a979c084c9024a954d8315424cb7be27c7..19881624b91f44c9332ad4ba147a66837864da06 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1317,13 +1317,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -1342,13 +1342,13 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin } private void refreshDirtyAttributes() { @@ -456,10 +456,10 @@ index f8419dde44ebc7324e783f8bee42132d5ec973c3..406767c60ec1a324faaf5d3658b16164 public double getDefaultValue() { diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93fae0c2aec 100644 +index 42ad600c6a5cb20e1d820f169f6a1a17ef3a5195..7f8eb388308806008805970d4d8ed329440380ee 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -@@ -26,8 +26,24 @@ public class AttributeInstance { +@@ -22,8 +22,24 @@ public class AttributeInstance { private final Map> modifiersByOperation = Maps.newEnumMap( AttributeModifier.Operation.class ); @@ -486,7 +486,7 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93f private double baseValue; private boolean dirty = true; private double cachedValue; -@@ -56,7 +72,13 @@ public class AttributeInstance { +@@ -52,7 +68,13 @@ public class AttributeInstance { @VisibleForTesting Map getModifiers(AttributeModifier.Operation operation) { @@ -501,7 +501,7 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93f } public Set getModifiers() { -@@ -144,8 +166,12 @@ public class AttributeInstance { +@@ -140,8 +162,12 @@ public class AttributeInstance { public double getValue() { if (this.dirty) { @@ -515,25 +515,25 @@ index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..9f09d78a7dac12c7f1b06029d32ad93f } return this.cachedValue; -@@ -192,7 +218,15 @@ public class AttributeInstance { - compoundTag.store("id", TYPE_CODEC, this.attribute); - compoundTag.putDouble("base", this.baseValue); - if (!this.permanentModifiers.isEmpty()) { -- compoundTag.store("modifiers", AttributeModifier.CODEC.listOf(), List.copyOf(this.permanentModifiers.values())); -+ // Leaf start - Multithreaded tracker -+ if (org.dreeam.leaf.config.modules.async.MultithreadedTracker.enabled) { -+ synchronized (this) { -+ compoundTag.store("modifiers", AttributeModifier.CODEC.listOf(), List.copyOf(this.permanentModifiers.values())); -+ } -+ } else { -+ compoundTag.store("modifiers", AttributeModifier.CODEC.listOf(), List.copyOf(this.permanentModifiers.values())); -+ } -+ // Leaf end - Multithreaded tracker - } +@@ -184,7 +210,15 @@ public class AttributeInstance { + } - return compoundTag; + public AttributeInstance.Packed pack() { +- return new AttributeInstance.Packed(this.attribute, this.baseValue, List.copyOf(this.permanentModifiers.values())); ++ // Leaf start - Multithreaded tracker ++ if (org.dreeam.leaf.config.modules.async.MultithreadedTracker.enabled) { ++ synchronized (this) { ++ return new AttributeInstance.Packed(this.attribute, this.baseValue, List.copyOf(this.permanentModifiers.values())); ++ } ++ } else { ++ return new AttributeInstance.Packed(this.attribute, this.baseValue, List.copyOf(this.permanentModifiers.values())); ++ } ++ // Leaf end - Multithreaded tracker + } + + public void apply(AttributeInstance.Packed instance) { diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index 909c9b5b82f1a41087a594fe5b5c021feb22f5e3..bd3a9adb61be55f216199572612027643e05dab7 100644 +index 0ac398b8b10aae5e67a797b2991c66874003f282..d62c2644847173de8e11296508f111e786a95091 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java @@ -15,9 +15,11 @@ import net.minecraft.resources.ResourceLocation; @@ -632,10 +632,10 @@ index 24710041ccbc70e5506d8d89ae34f0141977f209..05de8a77b389691dd6986f36b4cb8cc0 if (attributeInstance == null) { return null; diff --git a/net/minecraft/world/entity/item/PrimedTnt.java b/net/minecraft/world/entity/item/PrimedTnt.java -index 36e3937c9e09852937c94c268c877a15337835c5..8aedc3ca463745fe32cac977208b23dc0b8e73b6 100644 +index 2a7f5f1801d22ca7b06ff9701588451c7f406515..7e517e9ae59c5d32268fae1cade7febe8b2325dc 100644 --- a/net/minecraft/world/entity/item/PrimedTnt.java +++ b/net/minecraft/world/entity/item/PrimedTnt.java -@@ -145,12 +145,14 @@ public class PrimedTnt extends Entity implements TraceableEntity { +@@ -144,12 +144,14 @@ public class PrimedTnt extends Entity implements TraceableEntity { net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket velocityPacket = new net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket(this); net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket positionPacket = net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket.teleport(this.getId(), net.minecraft.world.entity.PositionMoveRotation.of(this), java.util.Set.of(), this.onGround); @@ -681,7 +681,7 @@ index 325ec57df2885f5e81b8a6b61e3a9fed9484b30f..abc5c097861d0decf49d0d3970ab48f1 @Override diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java -index 7bbeed6c998c91e68376d3f17a510d68e3cd0b27..d62ff9ebd4b55e1a9a0b51e84be868d844e5a954 100644 +index bf01c9d54248ceb8f97cf1e1c0e4234a338cb8ce..d049af4f129f6ac2d53f10c7a811c989d1f3edc0 100644 --- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java @@ -211,6 +211,7 @@ public class MapItemSavedData extends SavedData {