diff --git a/gradle.properties b/gradle.properties index 3d531dee..881786c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ group=org.leavesmc.leaves version=1.21.8-R0.1-SNAPSHOT mcVersion=1.21.8 -paperRef=f866a5fd5497798590aebefb99e417c97a8e1e76 +paperRef=614e9acfca696b98b810c65e3582993fcefc321e preVersion=false org.gradle.caching=true diff --git a/leaves-server/minecraft-patches/features/0007-Leaves-Fakeplayer.patch b/leaves-server/minecraft-patches/features/0007-Leaves-Fakeplayer.patch index 8fc4fcc2..02ba8d4c 100644 --- a/leaves-server/minecraft-patches/features/0007-Leaves-Fakeplayer.patch +++ b/leaves-server/minecraft-patches/features/0007-Leaves-Fakeplayer.patch @@ -199,6 +199,18 @@ index 14e2e0fcf20c8fa875bbefb97a673be4928d099a..8af40a77dc3da1599da2793168488f88 } else { return i; } +diff --git a/net/minecraft/server/commands/OpCommand.java b/net/minecraft/server/commands/OpCommand.java +index f2286b96b8f40b4588f817913c42ae7b4a92340f..e6c7bbb023000b9de90c1256274ff5aba4a6478a 100644 +--- a/net/minecraft/server/commands/OpCommand.java ++++ b/net/minecraft/server/commands/OpCommand.java +@@ -43,6 +43,7 @@ public class OpCommand { + int i = 0; + + for (GameProfile gameProfile : gameProfiles) { ++ if (gameProfile instanceof org.leavesmc.leaves.bot.BotList.CustomGameProfile) continue; // Leaves - disable op + if (!playerList.isOp(gameProfile)) { + playerList.op(gameProfile); + i++; diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java index 414a8357a7498c69341fa634ada2e664e18ca03a..f85993fc507d699728e058b12bb49dcb7aaea44b 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java @@ -482,7 +494,7 @@ index 61530843a32632f54f3d4ad913e649ee2dca3f38..d5051d8a2b0af5d8b63a0d10987c0a7e final boolean yZero = movement.y == 0.0; final boolean zZero = movement.z == 0.0; diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index 0c52e315557e1dae6a852694786e72241fff1e29..fbee8c381bc5ed04f5fb0fbd7b67704b9a159b47 100644 +index 0268e02d2ef2cb3d699644a804e23a6da4521f4c..cc17fa4aa24d9fa258d61a74ba49c08979774698 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java @@ -3117,7 +3117,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin @@ -494,7 +506,7 @@ index 0c52e315557e1dae6a852694786e72241fff1e29..fbee8c381bc5ed04f5fb0fbd7b67704b this.setSpeed(this.getRiddenSpeed(player)); this.travel(riddenInput); } else { -@@ -3955,7 +3955,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -3971,7 +3971,7 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin // Paper start - lag compensate eating // we add 1 to the expected time to avoid lag compensating when we should not final boolean shouldLagCompensate = this.useItem.has(DataComponents.FOOD) && this.eatStartTime != -1 && (System.nanoTime() - this.eatStartTime) > ((1L + this.totalEatTimeTicks) * 50L * (1000L * 1000L)); @@ -503,7 +515,7 @@ index 0c52e315557e1dae6a852694786e72241fff1e29..fbee8c381bc5ed04f5fb0fbd7b67704b this.useItemRemaining = 0; // Paper end - lag compensate eating this.completeUsingItem(); -@@ -4132,6 +4132,23 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -4148,6 +4148,23 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin this.stopUsingItem(); } @@ -697,7 +709,7 @@ index f1ce4cff1c03a0037ade2c8ef989cf327c973a7e..0976aef81b950a062152094501372d00 double d1 = deltaMovement.x; double d2 = deltaMovement.y; diff --git a/net/minecraft/world/level/levelgen/PhantomSpawner.java b/net/minecraft/world/level/levelgen/PhantomSpawner.java -index d2e674b046bcf82a239b4706c3b89197ec6749c8..8e2c18fdb76ae6ea7402e6862a64c96db03f191a 100644 +index b3cfab9c82fe12694f5d2f56bd922828e51df680..3d5f64f67c402d7a86fd8a8e79b9fc90e61548a8 100644 --- a/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java @@ -48,6 +48,11 @@ public class PhantomSpawner implements CustomSpawner { diff --git a/leaves-server/minecraft-patches/features/0033-MC-Technical-Survival-Mode.patch b/leaves-server/minecraft-patches/features/0033-MC-Technical-Survival-Mode.patch index fcc7f502..1ce988f3 100644 --- a/leaves-server/minecraft-patches/features/0033-MC-Technical-Survival-Mode.patch +++ b/leaves-server/minecraft-patches/features/0033-MC-Technical-Survival-Mode.patch @@ -6,7 +6,7 @@ Subject: [PATCH] MC Technical Survival Mode Will automatically overwrite some configuration after startup diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 5f78a68170b390eb515af30e5cbe4559b1852706..51fd9298a931501ee15401b64f3194c72c00b00f 100644 +index 29b8e7b6d96ff7ca2dd53f00ea2010e6aad83a52..217bcd7f9aab84b9bff82af0f3cab95818ba51a2 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java @@ -1654,7 +1654,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc @@ -18,6 +18,19 @@ index 5f78a68170b390eb515af30e5cbe4559b1852706..51fd9298a931501ee15401b64f3194c7 } @Override +diff --git a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +index 57befff1f0675e889304a6258258384d8de02c87..36be5f1e3547d29fd85e3b3f0c39e8f5ec1adf4e 100644 +--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java ++++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java +@@ -70,7 +70,7 @@ public class AcquirePoi { + return false; + } else { + mutableLong.setValue(time + 20L + level.getRandom().nextInt(20)); +- if (level.paperConfig().entities.behavior.stuckEntityPoiRetryDelay.enabled() && mob.getNavigation().isStuck()) mutableLong.add(level.paperConfig().entities.behavior.stuckEntityPoiRetryDelay.intValue()); // Paper - Next stuck check delay config ++ if (!org.leavesmc.leaves.LeavesConfig.modify.mcTechnicalMode && level.paperConfig().entities.behavior.stuckEntityPoiRetryDelay.enabled() && mob.getNavigation().isStuck()) mutableLong.add(level.paperConfig().entities.behavior.stuckEntityPoiRetryDelay.intValue()); // Paper - Next stuck check delay config // Leaves - mc technical survival mode + PoiManager poiManager = level.getPoiManager(); + map.long2ObjectEntrySet().removeIf(entry -> !entry.getValue().isStillValid(time)); + Predicate predicate1 = pos -> { diff --git a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java index a0e0fad40838fa7d835f31e5ce4ae3ab40e0bfa4..d8effc3a9773d29319b8e2bd15abbf03f0996ce5 100644 --- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java @@ -58,7 +71,7 @@ index 4f647507d06d45a65b4b1793219d90c65e110225..dac4646902a93eaaa287f5b6da324eea entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { continue; diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 5f42af7c6fc82d6672ed06a2315254c9c5886ce4..e53b40c70c0a61cbe14a236a99725daa28512b0b 100644 +index d7755e6a4641b5463eb39885bf53b6950c09bfc9..1dd5538be2e45514c9009f60494ae5fceb2ad7e6 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -275,7 +275,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen diff --git a/leaves-server/minecraft-patches/features/0134-temp-fix-quick-craft.patch b/leaves-server/minecraft-patches/features/0134-temp-fix-quick-craft.patch index c6ee8526..60321a2c 100644 --- a/leaves-server/minecraft-patches/features/0134-temp-fix-quick-craft.patch +++ b/leaves-server/minecraft-patches/features/0134-temp-fix-quick-craft.patch @@ -7,10 +7,10 @@ caused by PaperMC/Paper#11765 should remove when PaperMC/Paper#11831 merged diff --git a/net/minecraft/world/entity/LivingEntity.java b/net/minecraft/world/entity/LivingEntity.java -index e3673ababa41a4d65b87adbc6d79d53a196564b7..6c9a7ae3e9a340de35ca4dfcd486cfe5818d2aa5 100644 +index 6b776ff621275e842c113000bd69528c96a598c3..deec9de308c90aef7844623569e847c727644b74 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -3945,11 +3945,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin +@@ -3961,11 +3961,11 @@ public abstract class LivingEntity extends Entity implements Attackable, Waypoin return null; } else { double d = this.getEyeY() - 0.3F; diff --git a/leaves-server/minecraft-patches/features/0138-Lithium-Sleeping-Block-Entity.patch b/leaves-server/minecraft-patches/features/0138-Lithium-Sleeping-Block-Entity.patch index f57a4304..91bff4f1 100644 --- a/leaves-server/minecraft-patches/features/0138-Lithium-Sleeping-Block-Entity.patch +++ b/leaves-server/minecraft-patches/features/0138-Lithium-Sleeping-Block-Entity.patch @@ -1424,7 +1424,7 @@ index 363d85c96bd3fb1a1945595df36e30bd6dd2fa4e..542910b3d5faa85f2b14022932c058bc + // Leaves end - Lithium Sleeping Block Entity } diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index d8eede6272ee712c81ed9429539837fdbd27bfcd..2bd773aafba7ad1bb66a4e77b45df281ead98dda 100644 +index d9969741bb8efbf83df51692ebcd12e3d77c10f6..4ed998637ea724e95ba491534b1ca69a5bd314cd 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -27,8 +27,30 @@ import net.minecraft.world.level.block.state.BlockState; @@ -1540,7 +1540,7 @@ index d8eede6272ee712c81ed9429539837fdbd27bfcd..2bd773aafba7ad1bb66a4e77b45df281 if (addItem(hopper, itemEntity)) { return true; } -@@ -923,6 +971,19 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -925,6 +973,19 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen } public void setCooldown(int cooldownTime) { @@ -1560,7 +1560,7 @@ index d8eede6272ee712c81ed9429539837fdbd27bfcd..2bd773aafba7ad1bb66a4e77b45df281 this.cooldownTime = cooldownTime; } -@@ -942,6 +1003,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -944,6 +1005,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @Override protected void setItems(NonNullList items) { this.items = items; @@ -1568,7 +1568,7 @@ index d8eede6272ee712c81ed9429539837fdbd27bfcd..2bd773aafba7ad1bb66a4e77b45df281 } public static void entityInside(Level level, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) { -@@ -956,4 +1018,731 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen +@@ -958,4 +1020,731 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen protected AbstractContainerMenu createMenu(int id, Inventory player) { return new HopperMenu(id, player, this); } diff --git a/leaves-server/minecraft-patches/features/0141-Do-not-tick-Arrow-life-regardless.patch b/leaves-server/minecraft-patches/features/0140-Do-not-tick-Arrow-life-regardless.patch similarity index 100% rename from leaves-server/minecraft-patches/features/0141-Do-not-tick-Arrow-life-regardless.patch rename to leaves-server/minecraft-patches/features/0140-Do-not-tick-Arrow-life-regardless.patch diff --git a/leaves-server/minecraft-patches/features/0140-Remove-paper-stuck-poi-check-delay.patch b/leaves-server/minecraft-patches/features/0140-Remove-paper-stuck-poi-check-delay.patch deleted file mode 100644 index 35332a0e..00000000 --- a/leaves-server/minecraft-patches/features/0140-Remove-paper-stuck-poi-check-delay.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: MC_XiaoHei -Date: Sun, 10 Aug 2025 17:03:40 +0800 -Subject: [PATCH] Remove paper stuck poi check delay - -Fix https://github.com/LeavesMC/Leaves/issues/626 - -diff --git a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -index b9174ae7e3a3e2de2d570b95ab5012ac3c3a2eda..a01e070ff90851890388d7e1c4496683cf8e941c 100644 ---- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java -@@ -70,7 +70,7 @@ public class AcquirePoi { - return false; - } else { - mutableLong.setValue(time + 20L + level.getRandom().nextInt(20)); -- if (mob.getNavigation().isStuck()) mutableLong.add(200); // Paper - Perf: Wait an additional 10s to check again if they're stuck // TODO Modifies Vanilla behavior, add config option -+ // if (mob.getNavigation().isStuck()) mutableLong.add(200); // Paper - Perf: Wait an additional 10s to check again if they're stuck // TODO Modifies Vanilla behavior, add config option // Leaves: tmp remove this(https://github.com/LeavesMC/Leaves/issues/626) - PoiManager poiManager = level.getPoiManager(); - map.long2ObjectEntrySet().removeIf(entry -> !entry.getValue().isStillValid(time)); - Predicate predicate1 = pos -> {