diff --git a/leaf-archived-patches/unapplied/server/gale-patches/features/0002-Fix-Pufferfish-and-Purpur-patches.patch b/leaf-archived-patches/unapplied/server/gale-patches/features/0002-Fix-Pufferfish-and-Purpur-patches.patch deleted file mode 100644 index dc891ce8..00000000 --- a/leaf-archived-patches/unapplied/server/gale-patches/features/0002-Fix-Pufferfish-and-Purpur-patches.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> -Date: Mon, 29 Apr 2024 14:18:58 -0400 -Subject: [PATCH] Fix Pufferfish and Purpur patches - - -diff --git a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java -index 38ecc4a0ea6e9a7f4c3a01077b7fc6f04fa20d80..6c99f64eca1fa68bb4714021cefb999dcd335b21 100644 ---- a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java -+++ b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java -@@ -101,10 +101,10 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher { - // Gale end - branding changes - version fetcher - - return switch (distance) { -- case DISTANCE_ERROR -> text("Error obtaining version information", NamedTextColor.YELLOW); -- case 0 -> text("You are running the latest version", NamedTextColor.GREEN); -- case DISTANCE_UNKNOWN -> text("Unknown version", NamedTextColor.YELLOW); -- default -> text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW) -+ case DISTANCE_ERROR -> text("* Error obtaining version information", NamedTextColor.RED); // Purpur - Rebrand -+ case 0 -> text("* You are running the latest version", NamedTextColor.GREEN); // Purpur - Rebrand -+ case DISTANCE_UNKNOWN -> text("* Unknown version", NamedTextColor.YELLOW); // Purpur - Rebrand -+ default -> text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur - Rebrand - .append(Component.newline()) - .append(text("Download the new version at: ") - .append(text(this.downloadPage, NamedTextColor.GOLD) // Gale - branding changes - version fetcher -@@ -149,6 +149,6 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher { - return null; - } - -- return text("Previous version: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); -+ return text("Previous: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); // Purpur - Rebrand - } - } diff --git a/leaf-archived-patches/unapplied/server/gale-patches/features/0003-KeYi-Disable-arrow-despawn-counter-by-default.patch b/leaf-archived-patches/unapplied/server/gale-patches/features/0003-KeYi-Disable-arrow-despawn-counter-by-default.patch deleted file mode 100644 index 241e9e53..00000000 --- a/leaf-archived-patches/unapplied/server/gale-patches/features/0003-KeYi-Disable-arrow-despawn-counter-by-default.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: nostalgic853 -Date: Mon, 24 Oct 2022 10:28:54 +0800 -Subject: [PATCH] KeYi: Disable arrow despawn counter by default - -Original license: MIT -Original project: https://github.com/KeYiMC/KeYi - -diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -index 34cccb190510c041062858fca20cc40ea5be5f9e..f550c88d125ffafebfad7663088c080bbf771665 100644 ---- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -@@ -132,7 +132,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { - - } - -- public boolean arrowMovementResetsDespawnCounter = true; // Gale - Purpur - make arrow movement resetting despawn counter configurable -+ public boolean arrowMovementResetsDespawnCounter = false; // Gale - Purpur - make arrow movement resetting despawn counter configurable // Leaf - KeYi - Disable arrow despawn counter by default - public boolean entitiesCanRandomStrollIntoNonTickingChunks = true; // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks - public double entityWakeUpDurationRatioStandardDeviation = 0.2; // Gale - variable entity wake-up duration - public boolean hideFlamesOnEntitiesWithFireResistance = false; // Gale - Slice - hide flames on entities with fire resistance diff --git a/leaf-archived-patches/unapplied/server/gale-patches/features/0004-Reduce-active-items-finding-hopper-nearby-check.patch b/leaf-archived-patches/unapplied/server/gale-patches/features/0004-Reduce-active-items-finding-hopper-nearby-check.patch deleted file mode 100644 index 9a183697..00000000 --- a/leaf-archived-patches/unapplied/server/gale-patches/features/0004-Reduce-active-items-finding-hopper-nearby-check.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> -Date: Mon, 15 Jan 2024 10:53:10 -0500 -Subject: [PATCH] Reduce active items finding hopper nearby check - -This patch add a toggle for active items checking MinecraftHopper nearby, - -But still recommend to turn-off `checkForMinecartNearItemWhileActive` -Since `Reduce-hopper-item-checks.patch` will cause lag under massive dropped items - -diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -index f550c88d125ffafebfad7663088c080bbf771665..2cc0e485b5de49822c97530769591a090e2ff88f 100644 ---- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java -@@ -87,6 +87,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { - public int duration = 100; - public int nearbyItemMaxAge = 1200; - public int checkForMinecartNearItemInterval = 20; -+ public boolean checkForMinecartNearItemWhileActive = false; // Leaf - Reduce active items finding hopper nearby check - public boolean checkForMinecartNearItemWhileInactive = true; - public double maxItemHorizontalDistance = 24.0; - public double maxItemVerticalDistance = 4.0; diff --git a/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch b/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch index f480f400..a9cc60f8 100644 --- a/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch +++ b/leaf-server/minecraft-patches/features/0005-Remove-vanilla-profiler.patch @@ -169,7 +169,7 @@ index 18071dcc69cc28471dddb7de94e803ec1e5fc2e4..e30bb9c4046200c1a6e4e917d15b205f } } diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..2505000585f6b726914861faf8f731bd7e83a34a 100644 +index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..923fc9d611d46017cf7ac8e6de6cf0966e0ce9f9 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java @@ -113,19 +113,8 @@ import net.minecraft.util.TimeUtil; @@ -276,15 +276,18 @@ index d8179f1b7441679a96ac8ccbd67c2cb1c4fc4fd6..2505000585f6b726914861faf8f731bd final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0; try { this.isSaving = true; -@@ -1558,7 +1522,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop serverPlayer1.connection.suspendFlushing()); this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit // Paper start - Folia scheduler API -@@ -1673,9 +1630,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper - Add EntityMoveEvent serverLevel.updateLagCompensationTick(); // Paper - lag compensation net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers - profilerFiller.push(() -> serverLevel + " " + serverLevel.dimension().location()); /* Drop global time updates if (this.tickCount % 20 == 0) { - profilerFiller.push("timeSync"); -@@ -1719,8 +1673,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function threadFunction) { AtomicReference atomicReference = new AtomicReference<>(); -@@ -1629,6 +1630,22 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { for (final net.minecraft.world.entity.Entity entity : level.getEntities().getAll()) { if (entity.isRemoved()) { -@@ -1640,6 +1657,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = new ArrayList<>(); ++ List list = new java.util.ArrayList<>(); + + for (MobEffectInstance effect : this.activeEffects.values()) { + if (effect.isVisible()) { diff --git a/leaf-server/minecraft-patches/features/0148-Replace-Entity-active-effects-map-with-optimized-col.patch b/leaf-server/minecraft-patches/features/0148-Replace-Entity-active-effects-map-with-optimized-col.patch index 05646746..5c4c22e6 100644 --- a/leaf-server/minecraft-patches/features/0148-Replace-Entity-active-effects-map-with-optimized-col.patch +++ b/leaf-server/minecraft-patches/features/0148-Replace-Entity-active-effects-map-with-optimized-col.patch @@ -6,7 +6,7 @@ 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 d55a701d1f9a39b4734c8b02b655e1f1a53e616b..82289f1b8b3097fe20c3508461c79ab42fbef0f6 100644 +index 4fd0a728bcc3a7063cefe4d163329f07db06176f..0e1fb766570b5ff0e3c4a0f04c4ef3c589417322 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 { @@ -23,7 +23,7 @@ index d55a701d1f9a39b4734c8b02b655e1f1a53e616b..82289f1b8b3097fe20c3508461c79ab4 @@ -977,15 +981,16 @@ public abstract class LivingEntity extends Entity implements Attackable { private void updateSynchronizedMobEffectParticles() { // Leaf start - Remove stream in entity visible effects filter - List list = new ArrayList<>(); + List list = new java.util.ArrayList<>(); + final Collection effectsValues = this.activeEffects.values(); // Leaf - Replace Entity active effects map with optimized collection - for (MobEffectInstance effect : this.activeEffects.values()) { diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0074-Fix-MC-65198.patch b/leaf-server/minecraft-patches/features/0152-Fix-MC-65198.patch similarity index 75% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0074-Fix-MC-65198.patch rename to leaf-server/minecraft-patches/features/0152-Fix-MC-65198.patch index c627cc99..db5497f1 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0074-Fix-MC-65198.patch +++ b/leaf-server/minecraft-patches/features/0152-Fix-MC-65198.patch @@ -3,10 +3,10 @@ From: HaHaWTH Date: Wed, 13 Mar 2024 03:33:08 +0800 Subject: [PATCH] Fix MC-65198 -Mojang issues: https://bugs.mojang.com/browse/MC-65198 +Mojang issues: https://bugs.mojang.com/browse/MC/issues/MC-65198 diff --git a/net/minecraft/world/inventory/ItemCombinerMenu.java b/net/minecraft/world/inventory/ItemCombinerMenu.java -index c605bd700fd9f5a6596a2bf9648492786306b025..77c0b0b6c63d0a2955fcf3a479581f09067f3e62 100644 +index 34d52c941395645e77de810855b14012c259cf02..7ad3edf0e65c688408bf48305028468e2731cf75 100644 --- a/net/minecraft/world/inventory/ItemCombinerMenu.java +++ b/net/minecraft/world/inventory/ItemCombinerMenu.java @@ -120,6 +120,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { @@ -17,30 +17,30 @@ index c605bd700fd9f5a6596a2bf9648492786306b025..77c0b0b6c63d0a2955fcf3a479581f09 int inventorySlotStart = this.getInventorySlotStart(); int useRowEnd = this.getUseRowEnd(); if (index == this.getResultSlot()) { -@@ -157,7 +158,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { +@@ -156,7 +157,7 @@ public abstract class ItemCombinerMenu extends AbstractContainerMenu { + return ItemStack.EMPTY; } - this.activeQuickItem = itemStack; // Purpur - Anvil API - slot.onTake(player, item); + slot.onTake(player, itemStack2); // Leaf - Fix MC-65198 - this.activeQuickItem = null; // Purpur - Anvil API } + return itemStack; diff --git a/net/minecraft/world/inventory/ResultSlot.java b/net/minecraft/world/inventory/ResultSlot.java -index 01b8d73b1be9b41d6f51d11a0bead37a7bd9023f..7637eed0dedcdc5ac0dd51cc82010eb4bbf5b784 100644 +index e4cba45c327d96550a92cd5f9a30b1e5bd212747..ba237017e21d66b4eb3b47b4c7160015993da348 100644 --- a/net/minecraft/world/inventory/ResultSlot.java +++ b/net/minecraft/world/inventory/ResultSlot.java @@ -49,7 +49,7 @@ public class ResultSlot extends Slot { @Override protected void checkTakeAchievements(ItemStack stack) { if (this.removeCount > 0) { -- stack.onCraftedBy(this.player.level(), this.player, this.removeCount); -+ stack.onCraftedBy(this.player.level(), this.player, stack.getCount()); // Leaf - Fix MC-65198 +- stack.onCraftedBy(this.player, this.removeCount); ++ stack.onCraftedBy(this.player, stack.getCount()); // Leaf - Fix MC-65198 } if (this.container instanceof RecipeCraftingHolder recipeCraftingHolder) { diff --git a/net/minecraft/world/inventory/StonecutterMenu.java b/net/minecraft/world/inventory/StonecutterMenu.java -index d6854d0ebe5cb4205963e879d71eb3940d54de1f..72dbf8c03fcd5210fb2764f5c0a2a3ce3b1f9b51 100644 +index 9b0b213d7550f02ddba2f9f19fa7b0a45437e968..516acc81b12c003df7744cd66f5dd9b95c0485a4 100644 --- a/net/minecraft/world/inventory/StonecutterMenu.java +++ b/net/minecraft/world/inventory/StonecutterMenu.java @@ -238,6 +238,7 @@ public class StonecutterMenu extends AbstractContainerMenu { @@ -49,7 +49,7 @@ index d6854d0ebe5cb4205963e879d71eb3940d54de1f..72dbf8c03fcd5210fb2764f5c0a2a3ce itemStack = item.copy(); + ItemStack itemStack2 = itemStack.copy(); // Leaf - Fix MC-65198 if (index == 1) { - item1.onCraftedBy(item, player.level(), player); + item1.onCraftedBy(item, player); if (!this.moveItemStackTo(item, 2, 38, true)) { @@ -270,7 +271,7 @@ public class StonecutterMenu extends AbstractContainerMenu { return ItemStack.EMPTY; diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0075-Fix-MC-200418.patch b/leaf-server/minecraft-patches/features/0153-Fix-MC-200418.patch similarity index 75% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0075-Fix-MC-200418.patch rename to leaf-server/minecraft-patches/features/0153-Fix-MC-200418.patch index 5b691656..4682b5d4 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0075-Fix-MC-200418.patch +++ b/leaf-server/minecraft-patches/features/0153-Fix-MC-200418.patch @@ -1,19 +1,18 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:29:57 +0800 -Subject: [PATCH] Fix-MC-200418 +Subject: [PATCH] Fix MC-200418 -Related MC issue: https://bugs.mojang.com/browse/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 cb0e000c5b8636296c7d7474d0947c75f41b6058..d4b6c93f9f0e109be300164c4fd9167aba2d951c 100644 +index a8cd7103e636b57be1270d0f3549c709330b5536..33369d4faf80d36cee5dd3317a8778da5edd060a 100644 --- a/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/net/minecraft/world/entity/monster/ZombieVillager.java -@@ -320,6 +320,12 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { +@@ -233,6 +233,11 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { if (!this.isSilent()) { - serverLevel.levelEvent(null, 1027, this.blockPosition(), 0); + level.levelEvent(null, 1027, this.blockPosition(), 0); } -+ + // Leaf start - Fix MC-200418 + if (villager.isPassenger() && villager.getVehicle() instanceof net.minecraft.world.entity.animal.Chicken && villager.isBaby()) { + villager.removeVehicle(); diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0076-Fix-MC-119417.patch b/leaf-server/minecraft-patches/features/0154-Fix-MC-119417.patch similarity index 76% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0076-Fix-MC-119417.patch rename to leaf-server/minecraft-patches/features/0154-Fix-MC-119417.patch index 3e4795e9..62f57d62 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0076-Fix-MC-119417.patch +++ b/leaf-server/minecraft-patches/features/0154-Fix-MC-119417.patch @@ -1,15 +1,15 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:42:45 +0800 -Subject: [PATCH] Fix-MC-119417 +Subject: [PATCH] Fix MC-119417 -Related MC issue: https://bugs.mojang.com/browse/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 29fd9cea422e1ee09f6983a9b72847fbeaf57e3d..2a3c38cd8e31f73eca2508ad94e46ace980de50c 100644 +index d32acdf38a35d569669b272560c72651240178db..637e595c99bf0580d59913dff579868dbf01491b 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2267,6 +2267,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2123,6 +2123,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-archived-patches/unapplied/server/minecraft-patches/features/0077-Fix-MC-223153.patch b/leaf-server/minecraft-patches/features/0155-Fix-MC-223153.patch similarity index 73% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0077-Fix-MC-223153.patch rename to leaf-server/minecraft-patches/features/0155-Fix-MC-223153.patch index c89c8255..4f52890f 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0077-Fix-MC-223153.patch +++ b/leaf-server/minecraft-patches/features/0155-Fix-MC-223153.patch @@ -1,15 +1,15 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: HaHaWTH <102713261+HaHaWTH@users.noreply.github.com> Date: Sun, 7 Jul 2024 01:59:11 +0800 -Subject: [PATCH] Fix-MC-223153 +Subject: [PATCH] Fix MC-223153 -Related MC issue: https://bugs.mojang.com/browse/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 bf047be5b577b0d1bf70458df14618bcfe2d1de2..07a8fbfa7eb6e684ea699f009ce2d19311994e39 100644 +index cea1e405c940cd51cf830f28bfc6ce72c0c36a12..01b1495dfd8619ae29591ed4cadce9a0330b85bc 100644 --- a/net/minecraft/world/level/block/Blocks.java +++ b/net/minecraft/world/level/block/Blocks.java -@@ -6632,6 +6632,7 @@ public class Blocks { +@@ -6742,6 +6742,7 @@ public class Blocks { .mapColor(MapColor.COLOR_ORANGE) .instrument(NoteBlockInstrument.BASEDRUM) .requiresCorrectToolForDrops() diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0078-Configurable-player-knockback-zombie.patch b/leaf-server/minecraft-patches/features/0156-Configurable-player-knockback-zombie.patch similarity index 89% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0078-Configurable-player-knockback-zombie.patch rename to leaf-server/minecraft-patches/features/0156-Configurable-player-knockback-zombie.patch index 2df01656..6e3f27c0 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0078-Configurable-player-knockback-zombie.patch +++ b/leaf-server/minecraft-patches/features/0156-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 4f0da30fa659ecabdfbd1d17e50888c32501b6e7..f744c9dca670cbbcc7549be17bf51eb683dd1ae0 100644 +index 0e1fb766570b5ff0e3c4a0f04c4ef3c589417322..4b3de5d5a1c29f8f2c62ef059e90614d0791d88b 100644 --- a/net/minecraft/world/entity/LivingEntity.java +++ b/net/minecraft/world/entity/LivingEntity.java -@@ -1998,6 +1998,8 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2018,6 +2018,8 @@ public abstract class LivingEntity extends Entity implements Attackable { } 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 4f0da30fa659ecabdfbd1d17e50888c32501b6e7..f744c9dca670cbbcc7549be17bf51eb6 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 -@@ -2028,6 +2030,20 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2048,6 +2050,20 @@ public abstract class LivingEntity extends Entity implements Attackable { } } diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0080-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch b/leaf-server/minecraft-patches/features/0157-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch similarity index 87% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0080-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch rename to leaf-server/minecraft-patches/features/0157-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch index 2078d623..5f3ee49e 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0080-Paper-PR-Skip-AI-during-inactive-ticks-for-non-aware.patch +++ b/leaf-server/minecraft-patches/features/0157-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 8b3dfb1385a2252a4aaead5558c0ffbd5c204971..c32086ddf90fafcc55600f9e0724b9f915671482 100644 +index a1ecb7c5ee0e1fe1164e277d8991d6d990035f76..c3f659396fd7d01140f8038ea0acc4b4f10bded6 100644 --- a/net/minecraft/world/entity/Mob.java +++ b/net/minecraft/world/entity/Mob.java -@@ -219,6 +219,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab +@@ -206,6 +206,11 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashab @Override public void inactiveTick() { super.inactiveTick(); @@ -24,10 +24,10 @@ index 8b3dfb1385a2252a4aaead5558c0ffbd5c204971..c32086ddf90fafcc55600f9e0724b9f9 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 e8e2848c12e3cf2ad86fc3bd18f03182ee291775..bee017f2c47a9f0876e2e05ce1c720332fb74566 100644 +index cb9c722251e01cbbd827af9aff5f5942c62d2011..8b96a2695d6cb62e8d38e429769bd7964241c002 100644 --- a/net/minecraft/world/entity/npc/Villager.java +++ b/net/minecraft/world/entity/npc/Villager.java -@@ -371,7 +371,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -275,7 +275,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler if (this.getUnhappyCounter() > 0) { this.setUnhappyCounter(this.getUnhappyCounter() - 1); } diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0081-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch b/leaf-server/minecraft-patches/features/0158-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch similarity index 92% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0081-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch rename to leaf-server/minecraft-patches/features/0158-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch index 086eeb7f..e4ecb525 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0081-Paper-PR-Prevent-zombie-reinforcements-loading-chunk.patch +++ b/leaf-server/minecraft-patches/features/0158-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 e64f9308fc848c0f22d8dbd6e544b7862054be7b..ecdfadca31c5833e2a685163925540df4b72dc81 100644 +index 39b65970a48568c95ff482b9636e7391f300ffa8..4395947fc8c719864ac2afde5e6bbb53da5129c2 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -396,6 +396,13 @@ public class Zombie extends Monster { +@@ -353,6 +353,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-archived-patches/unapplied/server/minecraft-patches/features/0082-PaperPR-Fix-some-beacon-event-issues.patch b/leaf-server/minecraft-patches/features/0159-PaperPR-Fix-some-beacon-event-issues.patch similarity index 87% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0082-PaperPR-Fix-some-beacon-event-issues.patch rename to leaf-server/minecraft-patches/features/0159-PaperPR-Fix-some-beacon-event-issues.patch index 89ae6679..e2e67857 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0082-PaperPR-Fix-some-beacon-event-issues.patch +++ b/leaf-server/minecraft-patches/features/0159-PaperPR-Fix-some-beacon-event-issues.patch @@ -35,10 +35,10 @@ index 66eee067b4ffdd72393ca813de995062be5b7a90..38d36a2798b9aa5298ae2936f872fc63 + // Paper end } diff --git a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 80b0feac68813f11dc5cadc5faf413a59ad73e5b..2fbbd384113cf62b64c7ff4e805265a09f55ceb0 100644 +index b77cdbf3e8cf0e9d66c9e5288ebae38c79dae1fe..bdf120291f52642ffa4266ac786bb2975b40bf10 100644 --- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -@@ -169,6 +169,8 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -162,6 +162,8 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name return VALID_EFFECTS.contains(effect) ? effect : null; } @@ -47,7 +47,7 @@ index 80b0feac68813f11dc5cadc5faf413a59ad73e5b..2fbbd384113cf62b64c7ff4e805265a0 public BeaconBlockEntity(BlockPos pos, BlockState blockState) { super(BlockEntityType.BEACON, pos, blockState); } -@@ -234,10 +236,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -225,10 +227,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name } } // Paper start - beacon activation/deactivation events @@ -65,7 +65,7 @@ index 80b0feac68813f11dc5cadc5faf413a59ad73e5b..2fbbd384113cf62b64c7ff4e805265a0 org.bukkit.block.Block block = org.bukkit.craftbukkit.block.CraftBlock.at(level, pos); new io.papermc.paper.event.block.BeaconDeactivatedEvent(block).callEvent(); } -@@ -245,10 +252,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -236,10 +243,10 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name if (blockEntity.lastCheckY >= height) { blockEntity.lastCheckY = level.getMinY() - 1; @@ -78,7 +78,7 @@ index 80b0feac68813f11dc5cadc5faf413a59ad73e5b..2fbbd384113cf62b64c7ff4e805265a0 if (!flag && flag1) { playSound(level, pos, SoundEvents.BEACON_ACTIVATE); -@@ -292,10 +299,6 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name +@@ -283,10 +290,6 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @Override public void setRemoved() { @@ -89,11 +89,11 @@ index 80b0feac68813f11dc5cadc5faf413a59ad73e5b..2fbbd384113cf62b64c7ff4e805265a0 // 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 +@@ -414,6 +417,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name this.primaryPower = loadEffect(tag, "primary_effect"); this.secondaryPower = loadEffect(tag, "secondary_effect"); - this.levels = tag.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available + this.levels = tag.getIntOr("Levels", 0); // CraftBukkit - SPIGOT-5053, use where available + this.justLoadedAndPreviouslyActive = this.levels > 0; // Paper - if (tag.contains("CustomName", 8)) { - this.name = parseCustomNameSafe(tag.getString("CustomName"), registries); - } + 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 diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0083-Dont-send-useless-entity-packets.patch b/leaf-server/minecraft-patches/features/0160-Dont-send-useless-entity-packets.patch similarity index 86% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0083-Dont-send-useless-entity-packets.patch rename to leaf-server/minecraft-patches/features/0160-Dont-send-useless-entity-packets.patch index b24fe9d6..4b5785b6 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0083-Dont-send-useless-entity-packets.patch +++ b/leaf-server/minecraft-patches/features/0160-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 ddf2a5e2cfeaa666a081dd857d6a6003d65d0e00..d8298c7925e3bcea07ead4d438478cc51abcfa16 100644 +index 936429fd17d8649329e6258a4e10c9e6bf62f6de..94fa37653598014d8187c4ecfd486709e4fb9f91 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -199,6 +199,8 @@ public class ServerEntity { +@@ -204,6 +204,8 @@ public class ServerEntity { } // Gale end - Airplane - better checking for useless move packets @@ -21,8 +21,8 @@ index ddf2a5e2cfeaa666a081dd857d6a6003d65d0e00..d8298c7925e3bcea07ead4d438478cc5 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 -@@ -275,6 +277,21 @@ public class ServerEntity { - } +@@ -287,6 +289,21 @@ public class ServerEntity { + ); } + // Purpur start @@ -32,9 +32,9 @@ index ddf2a5e2cfeaa666a081dd857d6a6003d65d0e00..d8298c7925e3bcea07ead4d438478cc5 + case ClientboundMoveEntityPacket.Pos ignored -> + moveEntityPacket.getXa() == 0 && moveEntityPacket.getYa() == 0 && moveEntityPacket.getZa() == 0; + case ClientboundMoveEntityPacket.PosRot ignored -> -+ moveEntityPacket.getXa() == 0 && moveEntityPacket.getYa() == 0 && moveEntityPacket.getZa() == 0 && moveEntityPacket.getyRot() == 0 && moveEntityPacket.getxRot() == 0; ++ moveEntityPacket.getXa() == 0 && moveEntityPacket.getYa() == 0 && moveEntityPacket.getZa() == 0 && moveEntityPacket.getYRot() == 0 && moveEntityPacket.getXRot() == 0; + case ClientboundMoveEntityPacket.Rot ignored -> -+ moveEntityPacket.getyRot() == 0 && moveEntityPacket.getxRot() == 0; ++ moveEntityPacket.getYRot() == 0 && moveEntityPacket.getXRot() == 0; + default -> false; + }; + } diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0085-Multithreaded-Tracker.patch b/leaf-server/minecraft-patches/features/0161-Multithreaded-Tracker.patch similarity index 83% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0085-Multithreaded-Tracker.patch rename to leaf-server/minecraft-patches/features/0161-Multithreaded-Tracker.patch index 162e665e..4193f141 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0085-Multithreaded-Tracker.patch +++ b/leaf-server/minecraft-patches/features/0161-Multithreaded-Tracker.patch @@ -24,10 +24,10 @@ But it is still recommending to use those packet based, virtual entity based NPC plugins, e.g. ZNPC Plus, Adyeshach, Fancy NPC, etc. diff --git a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -index dd2509996bfd08e8c3f9f2be042229eac6d7692d..a35e9fae8f8da0c42f0616c4f78dc396492673aa 100644 +index 02a9ef1694c796584c29430d27f0a09047368835..32608df3da169159c070f37cb55407f4f6187744 100644 --- a/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java +++ b/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java -@@ -342,7 +342,7 @@ public final class RegionizedPlayerChunkLoader { +@@ -340,7 +340,7 @@ public final class RegionizedPlayerChunkLoader { private boolean canGenerateChunks = true; private final ArrayDeque> delayedTicketOps = new ArrayDeque<>(); @@ -37,10 +37,10 @@ index dd2509996bfd08e8c3f9f2be042229eac6d7692d..a35e9fae8f8da0c42f0616c4f78dc396 private static final byte CHUNK_TICKET_STAGE_NONE = 0; private static final byte CHUNK_TICKET_STAGE_LOADING = 1; diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java -index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10f9faa6b2 100644 +index c60b9e4076450de2157c1a3cf4f98cc2c19e4e6a..560a857f3b61679bbf2ee93ac6da393052a1f320 100644 --- a/net/minecraft/server/level/ChunkMap.java +++ b/net/minecraft/server/level/ChunkMap.java -@@ -248,6 +248,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -255,6 +255,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } final ServerPlayer[] backingSet = inRange.getRawDataUnchecked(); @@ -56,7 +56,7 @@ index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10 for (int i = 0, len = inRange.size(); i < len; i++) { ++(backingSet[i].mobCounts[index]); } -@@ -951,6 +960,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1013,6 +1022,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider // Paper end - optimise entity tracker protected void tick() { @@ -70,7 +70,7 @@ index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10 // Paper start - optimise entity tracker if (true) { this.newTrackerTick(); -@@ -1073,7 +1089,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1135,7 +1151,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider final Entity entity; private final int range; SectionPos lastSectionPos; @@ -79,7 +79,7 @@ index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10 // Paper start - optimise entity tracker private long lastChunkUpdate = -1L; -@@ -1100,7 +1116,39 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1162,7 +1178,39 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider this.lastTrackedChunk = chunk; final ServerPlayer[] playersRaw = players.getRawDataUnchecked(); @@ -119,7 +119,7 @@ index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10 for (int i = 0, len = players.size(); i < len; ++i) { final ServerPlayer player = playersRaw[i]; this.updatePlayer(player); -@@ -1115,6 +1163,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1177,6 +1225,8 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } } } @@ -128,7 +128,7 @@ index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10 } @Override -@@ -1176,7 +1226,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1238,7 +1288,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void broadcast(Packet packet) { @@ -137,7 +137,7 @@ index 5d9d233e3a568aa6297ed9c703fa450f98158602..8986c059e7aadb58ae8d9ab7b848de10 serverPlayerConnection.send(packet); } } -@@ -1189,21 +1239,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1259,21 +1309,22 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } public void broadcastRemoved() { @@ -177,29 +177,10 @@ index f106373ef3ac4a8685c2939c9e8361688a285913..51ae390c68e7a3aa193329cc3bc47ca6 public boolean visible = true; diff --git a/net/minecraft/server/level/ServerEntity.java b/net/minecraft/server/level/ServerEntity.java -index d8298c7925e3bcea07ead4d438478cc51abcfa16..75670751064add901c2628d53d8028350f966c5d 100644 +index 94fa37653598014d8187c4ecfd486709e4fb9f91..8aebb5e5f42fd4ae54cdea8ab7573bda3dea1d30 100644 --- a/net/minecraft/server/level/ServerEntity.java +++ b/net/minecraft/server/level/ServerEntity.java -@@ -110,8 +110,16 @@ public class ServerEntity { - .forEach( - removedPassenger -> { - if (removedPassenger instanceof ServerPlayer serverPlayer1) { -- serverPlayer1.connection -- .teleport(serverPlayer1.getX(), serverPlayer1.getY(), serverPlayer1.getZ(), serverPlayer1.getYRot(), serverPlayer1.getXRot()); -+ // Leaf start - Multithreaded tracker - Ensure teleport is executed on server thread -+ if (org.dreeam.leaf.config.modules.async.MultithreadedTracker.enabled && Thread.currentThread() instanceof org.dreeam.leaf.async.tracker.MultithreadedTracker.MultithreadedTrackerThread) { -+ net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> serverPlayer1.connection -+ .teleport(serverPlayer1.getX(), serverPlayer1.getY(), serverPlayer1.getZ(), serverPlayer1.getYRot(), serverPlayer1.getXRot()) -+ ); -+ } else { -+ serverPlayer1.connection -+ .teleport(serverPlayer1.getX(), serverPlayer1.getY(), serverPlayer1.getZ(), serverPlayer1.getYRot(), serverPlayer1.getXRot()); -+ } -+ // Leaf end - Multithreaded tracker - Ensure teleport is executed on server thread - } - } - ); -@@ -435,12 +443,15 @@ public class ServerEntity { +@@ -443,12 +443,15 @@ public class ServerEntity { if (this.entity instanceof LivingEntity) { Set attributesToSync = ((LivingEntity)this.entity).getAttributes().getAttributesToSync(); if (!attributesToSync.isEmpty()) { @@ -218,10 +199,10 @@ index d8298c7925e3bcea07ead4d438478cc51abcfa16..75670751064add901c2628d53d802835 attributesToSync.clear(); diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java -index 0290e1f0c45677d337f77a0c8269894b32a43ca9..268c463d379528b8242f1628e97e67ea638b7ced 100644 +index 2c65987f7dda5b46a232a69e46b91090801fc246..0d73baebab6bdde6e279cc0da9c0ef8a275537ee 100644 --- a/net/minecraft/server/level/ServerLevel.java +++ b/net/minecraft/server/level/ServerLevel.java -@@ -2496,7 +2496,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe +@@ -2407,7 +2407,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe @Override public LevelEntityGetter getEntities() { @@ -231,10 +212,10 @@ index 0290e1f0c45677d337f77a0c8269894b32a43ca9..268c463d379528b8242f1628e97e67ea } diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c30e017e6cffa6aa828b0f6e8889885dbaaa4680..ba84b1caab62e3f04f2f9e7aed0c659c0106bc29 100644 +index 6314831d7ecefa14be1386eced3ee50510ebe769..f1cdeb9c1f8eeb69870d17d5453a311358740625 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1819,7 +1819,7 @@ public class ServerGamePacketListenerImpl +@@ -1731,7 +1731,7 @@ public class ServerGamePacketListenerImpl } public void internalTeleport(PositionMoveRotation posMoveRotation, Set relatives) { @@ -244,10 +225,10 @@ index c30e017e6cffa6aa828b0f6e8889885dbaaa4680..ba84b1caab62e3f04f2f9e7aed0c659c if (this.player.isRemoved()) { LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName()); diff --git a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -index 8013594bb4844e7a8abf28123958e7f632d39341..ceff383d565267edd13a6d9006030b8e1f8053e3 100644 +index 3ac9f36eae87369354e992a1d9b5c5b2d87d17cb..d99bbf299af2b2d3a61761c5c3c33c4d371d1b9b 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeInstance.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeInstance.java -@@ -24,8 +24,11 @@ public class AttributeInstance { +@@ -26,8 +26,11 @@ public class AttributeInstance { private final Map> modifiersByOperation = Maps.newEnumMap( AttributeModifier.Operation.class ); @@ -262,13 +243,13 @@ index 8013594bb4844e7a8abf28123958e7f632d39341..ceff383d565267edd13a6d9006030b8e private boolean dirty = true; private double cachedValue; diff --git a/net/minecraft/world/entity/ai/attributes/AttributeMap.java b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -index 89f4c5b2d61e27acd48063f9f24ce9ea91898b8b..371dd51c62c9a109014851c8a1562a5cb78b18b6 100644 +index 93a079df455e371a0ca7ada253dc8b7e16b0146f..fce4fa42dbec302b5c49c954d3286deea6f81d45 100644 --- a/net/minecraft/world/entity/ai/attributes/AttributeMap.java +++ b/net/minecraft/world/entity/ai/attributes/AttributeMap.java -@@ -19,11 +19,14 @@ import org.slf4j.Logger; +@@ -14,11 +14,14 @@ import net.minecraft.nbt.ListTag; + import net.minecraft.resources.ResourceLocation; public class AttributeMap { - private static final Logger LOGGER = LogUtils.getLogger(); + // Leaf start - Multithreaded tracker + private final boolean multiThreadedTrackingEnabled = org.dreeam.leaf.config.modules.async.MultithreadedTracker.enabled; // Gale start - Lithium - replace AI attributes with optimized collections @@ -282,4 +263,4 @@ index 89f4c5b2d61e27acd48063f9f24ce9ea91898b8b..371dd51c62c9a109014851c8a1562a5c + // Leaf end - Multithreaded tracker private final AttributeSupplier supplier; private final java.util.function.Function, AttributeInstance> createInstance; // Gale - Airplane - reduce entity allocations - private final net.minecraft.world.entity.LivingEntity entity; // Purpur - Ridables + diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0086-Nitori-Async-playerdata-Save.patch b/leaf-server/minecraft-patches/features/0162-Nitori-Async-playerdata-Save.patch similarity index 88% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0086-Nitori-Async-playerdata-Save.patch rename to leaf-server/minecraft-patches/features/0162-Nitori-Async-playerdata-Save.patch index 2f13c47e..00575e3f 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0086-Nitori-Async-playerdata-Save.patch +++ b/leaf-server/minecraft-patches/features/0162-Nitori-Async-playerdata-Save.patch @@ -7,10 +7,10 @@ Original license: GPL v3 Original project: https://github.com/Gensokyo-Reimagined/Nitori diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 5a0d30b8ff5e377224de67c9f464bd1c694a4397..1cb60107d95296fc9e2c106d70838c057564abeb 100644 +index 301b255d43a160b462e546ab894378cc38ae18e6..b74b58f6d110100c647ca4ffb9fbc8eb5c637dd9 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -1069,6 +1069,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop getIconFile() { diff --git a/net/minecraft/world/level/storage/PlayerDataStorage.java b/net/minecraft/world/level/storage/PlayerDataStorage.java -index c44110b123ba5912af18faf0065e9ded780da9b7..541c440d3211c6625974ac1e0055d62655256846 100644 +index ab9282c04c1996b037567d07f95e2b150bcfcd38..fa33d4b56eec6e00912e8027195c6f63c440bc59 100644 --- a/net/minecraft/world/level/storage/PlayerDataStorage.java +++ b/net/minecraft/world/level/storage/PlayerDataStorage.java -@@ -25,6 +25,7 @@ public class PlayerDataStorage { +@@ -23,6 +23,7 @@ public class PlayerDataStorage { private final File playerDir; protected final DataFixer fixerUpper; private static final DateTimeFormatter FORMATTER = FileNameDateFormatter.create(); @@ -72,7 +72,7 @@ index c44110b123ba5912af18faf0065e9ded780da9b7..541c440d3211c6625974ac1e0055d626 public PlayerDataStorage(LevelStorageSource.LevelStorageAccess levelStorageAccess, DataFixer fixerUpper) { this.fixerUpper = fixerUpper; -@@ -34,17 +35,43 @@ public class PlayerDataStorage { +@@ -32,17 +33,43 @@ public class PlayerDataStorage { public void save(Player player) { if (org.spigotmc.SpigotConfig.disablePlayerDataSaving) return; // Spigot @@ -124,7 +124,7 @@ index c44110b123ba5912af18faf0065e9ded780da9b7..541c440d3211c6625974ac1e0055d626 } private void backup(String name, String stringUuid, String suffix) { // CraftBukkit -@@ -60,7 +87,20 @@ public class PlayerDataStorage { +@@ -58,7 +85,20 @@ public class PlayerDataStorage { } } @@ -146,16 +146,16 @@ index c44110b123ba5912af18faf0065e9ded780da9b7..541c440d3211c6625974ac1e0055d626 File file = new File(this.playerDir, stringUuid + suffix); // CraftBukkit // Spigot start boolean usingWrongFile = false; -@@ -91,7 +131,7 @@ public class PlayerDataStorage { +@@ -89,7 +129,7 @@ public class PlayerDataStorage { public Optional load(Player player) { // CraftBukkit start - return this.load(player.getName().getString(), player.getStringUUID()).map((tag) -> { + return this.load(player.getName().getString(), player.getStringUUID(), player.getUUID()).map((tag) -> { // Leaf - Async playerdata saving - if (player instanceof ServerPlayer serverPlayer) { - CraftPlayer craftPlayer = serverPlayer.getBukkitEntity(); + if (player instanceof net.minecraft.server.level.ServerPlayer serverPlayer) { + org.bukkit.craftbukkit.entity.CraftPlayer craftPlayer = serverPlayer.getBukkitEntity(); // Only update first played if it is older than the one we have -@@ -106,20 +146,25 @@ public class PlayerDataStorage { +@@ -104,20 +144,25 @@ public class PlayerDataStorage { }); } @@ -174,7 +174,7 @@ index c44110b123ba5912af18faf0065e9ded780da9b7..541c440d3211c6625974ac1e0055d626 - return optional.or(() -> this.load(name, uuid, ".dat_old")).map(compoundTag -> { // CraftBukkit + return optional.or(() -> this.load(name, uuid, ".dat_old", playerUuid)).map(compoundTag -> { // CraftBukkit int dataVersion = NbtUtils.getDataVersion(compoundTag, -1); - compoundTag = ca.spottedleaf.dataconverter.minecraft.MCDataConverter.convertTag(ca.spottedleaf.dataconverter.minecraft.datatypes.MCTypeRegistry.PLAYER, compoundTag, dataVersion, net.minecraft.SharedConstants.getCurrentVersion().getDataVersion().getVersion()); // Paper - rewrite data conversion system + compoundTag = DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, compoundTag, dataVersion); // player.load(compoundTag); // CraftBukkit - handled above return compoundTag; }); diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0087-Optimize-nearby-alive-players-for-spawning.patch b/leaf-server/minecraft-patches/features/0163-Optimize-nearby-alive-players-for-spawning.patch similarity index 91% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0087-Optimize-nearby-alive-players-for-spawning.patch rename to leaf-server/minecraft-patches/features/0163-Optimize-nearby-alive-players-for-spawning.patch index 77cee482..d9110f70 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0087-Optimize-nearby-alive-players-for-spawning.patch +++ b/leaf-server/minecraft-patches/features/0163-Optimize-nearby-alive-players-for-spawning.patch @@ -7,11 +7,11 @@ Use SpottedLeaf's nearby players system to avoid iterating over all online playe and reduce the cost on predicate test diff --git a/net/minecraft/world/entity/EntitySelector.java b/net/minecraft/world/entity/EntitySelector.java -index 002ec5f1ec14411ca48ae04b3379db0c70f81942..d2ca99f8b5ad46c59b663cd56f3ee2bd66185381 100644 +index bfd58eb04eee606ac0a8071de9bf75f46c35decb..6ee502128da76a22bfc6e9bae813cd4c759af5b0 100644 --- a/net/minecraft/world/entity/EntitySelector.java +++ b/net/minecraft/world/entity/EntitySelector.java -@@ -32,7 +32,7 @@ public final class EntitySelector { - +@@ -30,7 +30,7 @@ public final class EntitySelector { + // Paper end - Ability to control player's insomnia and phantoms // Paper start - Affects Spawning API public static final Predicate PLAYER_AFFECTS_SPAWNING = (entity) -> { - return !entity.isSpectator() && entity.isAlive() && entity instanceof Player player && player.affectsSpawning; @@ -20,10 +20,10 @@ index 002ec5f1ec14411ca48ae04b3379db0c70f81942..d2ca99f8b5ad46c59b663cd56f3ee2bd // Paper end - Affects Spawning API diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index ecdfadca31c5833e2a685163925540df4b72dc81..9c83f1406c0aaad36383a23cebf270b8dc6ced33 100644 +index 4395947fc8c719864ac2afde5e6bbb53da5129c2..a326483505245f6106b8ea72574bc2ab23f5402f 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -406,7 +406,7 @@ public class Zombie extends Monster { +@@ -363,7 +363,7 @@ public class Zombie extends Monster { if (SpawnPlacements.isSpawnPositionOk(type, level, blockPos) && SpawnPlacements.checkSpawnRules(type, level, EntitySpawnReason.REINFORCEMENT, blockPos, level.random)) { zombie.setPos(i1, i2, i3); @@ -33,20 +33,20 @@ index ecdfadca31c5833e2a685163925540df4b72dc81..9c83f1406c0aaad36383a23cebf270b8 && level.noCollision(zombie) && (zombie.canSpawnInLiquids() || !level.containsAnyLiquid(zombie.getBoundingBox()))) { diff --git a/net/minecraft/world/level/BaseSpawner.java b/net/minecraft/world/level/BaseSpawner.java -index 8de482367f3d9d91048b7c85cbaefcda9f9fbcdc..8c6f8cb08b247dcf497822ae991aa3afbcb784f1 100644 +index 650ebce14d618076cec2066d134d2ae51a87076a..4137115888eeede519e10b87e520539b92eb75a8 100644 --- a/net/minecraft/world/level/BaseSpawner.java +++ b/net/minecraft/world/level/BaseSpawner.java -@@ -53,7 +53,7 @@ public abstract class BaseSpawner { +@@ -54,7 +54,7 @@ public abstract class BaseSpawner { + } public boolean isNearPlayer(Level level, BlockPos pos) { - if (level.purpurConfig.spawnerDeactivateByRedstone && level.hasNeighborSignal(pos)) return false; // Purpur - Redstone deactivates spawners - return level.hasNearbyAlivePlayerThatAffectsSpawning(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, this.requiredPlayerRange); // Paper - Affects Spawning API + return level.hasNearbyAlivePlayerThatAffectsSpawningForSpawner(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, this.requiredPlayerRange); // Paper - Affects Spawning API // Leaf - Optimize nearby alive players for spawning } public void clientTick(Level level, BlockPos pos) { diff --git a/net/minecraft/world/level/EntityGetter.java b/net/minecraft/world/level/EntityGetter.java -index 7719bc8ff1fbbc67cdf15e1fec28dc9233cea207..670860df81a3abfc1b8b53be505fce0ee32ee2c4 100644 +index 892a7c1eb1b321ca6d5ca709142e7feae1220815..3e3592e40950d54fd4b730442764b1de877ec9df 100644 --- a/net/minecraft/world/level/EntityGetter.java +++ b/net/minecraft/world/level/EntityGetter.java @@ -112,6 +112,89 @@ public interface EntityGetter extends ca.spottedleaf.moonrise.patches.chunk_syst diff --git a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0088-Cache-blockstate-cache-array.patch b/leaf-server/minecraft-patches/features/0164-Cache-blockstate-cache-array.patch similarity index 89% rename from leaf-archived-patches/unapplied/server/minecraft-patches/features/0088-Cache-blockstate-cache-array.patch rename to leaf-server/minecraft-patches/features/0164-Cache-blockstate-cache-array.patch index 35571560..0a33c070 100644 --- a/leaf-archived-patches/unapplied/server/minecraft-patches/features/0088-Cache-blockstate-cache-array.patch +++ b/leaf-server/minecraft-patches/features/0164-Cache-blockstate-cache-array.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Cache blockstate cache array diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index 117c7cedb9f355b5139b9aa9b15f4459453e3675..7f46f33fa565fa1a3aedce5524f19be8ba420352 100644 +index 331474bb33c8612283a0ec478c1ae8768180b22d..84f4d772bfe06383ca718b6a00d983e97e2e35f4 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -1050,6 +1050,10 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1047,6 +1047,10 @@ public abstract class BlockBehaviour implements FeatureElement { static final class Cache { private static final Direction[] DIRECTIONS = Direction.values(); private static final int SUPPORT_TYPE_COUNT = SupportType.values().length; @@ -19,7 +19,7 @@ index 117c7cedb9f355b5139b9aa9b15f4459453e3675..7f46f33fa565fa1a3aedce5524f19be8 protected final VoxelShape collisionShape; protected boolean largeCollisionShape; private final boolean[] faceSturdy; -@@ -1068,7 +1072,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1065,7 +1069,7 @@ public abstract class BlockBehaviour implements FeatureElement { ); } else { // Leaf start - Remove stream in BlockBehaviour cache blockstate @@ -28,7 +28,7 @@ index 117c7cedb9f355b5139b9aa9b15f4459453e3675..7f46f33fa565fa1a3aedce5524f19be8 if (this.collisionShape.min(axis) < 0.0 || this.collisionShape.max(axis) > 1.0) { this.largeCollisionShape = true; break; -@@ -1078,7 +1082,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1075,7 +1079,7 @@ public abstract class BlockBehaviour implements FeatureElement { this.faceSturdy = new boolean[DIRECTIONS.length * SUPPORT_TYPE_COUNT]; for (Direction direction : DIRECTIONS) { diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/AsyncChunkSending.java b/leaf-server/src/main/java/org/dreeam/leaf/async/AsyncChunkSending.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/AsyncChunkSending.java rename to leaf-server/src/main/java/org/dreeam/leaf/async/AsyncChunkSending.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/AsyncPlayerDataSaving.java b/leaf-server/src/main/java/org/dreeam/leaf/async/AsyncPlayerDataSaving.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/AsyncPlayerDataSaving.java rename to leaf-server/src/main/java/org/dreeam/leaf/async/AsyncPlayerDataSaving.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/locate/AsyncLocator.java b/leaf-server/src/main/java/org/dreeam/leaf/async/locate/AsyncLocator.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/locate/AsyncLocator.java rename to leaf-server/src/main/java/org/dreeam/leaf/async/locate/AsyncLocator.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/tracker/MultithreadedTracker.java b/leaf-server/src/main/java/org/dreeam/leaf/async/tracker/MultithreadedTracker.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/tracker/MultithreadedTracker.java rename to leaf-server/src/main/java/org/dreeam/leaf/async/tracker/MultithreadedTracker.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/world/SparklyPaperServerLevelTickExecutorThreadFactory.java b/leaf-server/src/main/java/org/dreeam/leaf/async/world/SparklyPaperServerLevelTickExecutorThreadFactory.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/async/world/SparklyPaperServerLevelTickExecutorThreadFactory.java rename to leaf-server/src/main/java/org/dreeam/leaf/async/world/SparklyPaperServerLevelTickExecutorThreadFactory.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncBlockFinding.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncBlockFinding.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncBlockFinding.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncBlockFinding.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncChunkSend.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncChunkSend.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncChunkSend.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncChunkSend.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncLocator.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncLocator.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncLocator.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncLocator.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncMobSpawning.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncPlayerDataSave.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncPlayerDataSave.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/AsyncPlayerDataSave.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/AsyncPlayerDataSave.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/MultithreadedTracker.java diff --git a/leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/SparklyPaperParallelWorldTicking.java b/leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/SparklyPaperParallelWorldTicking.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/org/dreeam/leaf/config/modules/async/SparklyPaperParallelWorldTicking.java rename to leaf-server/src/main/java/org/dreeam/leaf/config/modules/async/SparklyPaperParallelWorldTicking.java diff --git a/leaf-server/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/leaf-server/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java index 34cccb19..e151728e 100644 --- a/leaf-server/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java +++ b/leaf-server/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java @@ -87,6 +87,9 @@ public class GaleWorldConfiguration extends ConfigurationPart { public int duration = 100; public int nearbyItemMaxAge = 1200; public int checkForMinecartNearItemInterval = 20; + // Still recommend to turn-off `checkForMinecartNearItemWhileActive` + // Since `Reduce-hopper-item-checks.patch` will cause lag under massive dropped items + public boolean checkForMinecartNearItemWhileActive = false; // Leaf - Reduce active items finding hopper nearby check public boolean checkForMinecartNearItemWhileInactive = true; public double maxItemHorizontalDistance = 24.0; public double maxItemVerticalDistance = 4.0; @@ -132,7 +135,7 @@ public class GaleWorldConfiguration extends ConfigurationPart { } - public boolean arrowMovementResetsDespawnCounter = true; // Gale - Purpur - make arrow movement resetting despawn counter configurable + public boolean arrowMovementResetsDespawnCounter = false; // Gale - Purpur - make arrow movement resetting despawn counter configurable // Leaf - KeYi - Disable arrow despawn counter by default public boolean entitiesCanRandomStrollIntoNonTickingChunks = true; // Gale - MultiPaper - prevent entities random strolling into non-ticking chunks public double entityWakeUpDurationRatioStandardDeviation = 0.2; // Gale - variable entity wake-up duration public boolean hideFlamesOnEntitiesWithFireResistance = false; // Gale - Slice - hide flames on entities with fire resistance diff --git a/leaf-server/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java b/leaf-server/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java index 38ecc4a0..6c99f64e 100644 --- a/leaf-server/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java +++ b/leaf-server/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java @@ -101,10 +101,10 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher { // Gale end - branding changes - version fetcher return switch (distance) { - case DISTANCE_ERROR -> text("Error obtaining version information", NamedTextColor.YELLOW); - case 0 -> text("You are running the latest version", NamedTextColor.GREEN); - case DISTANCE_UNKNOWN -> text("Unknown version", NamedTextColor.YELLOW); - default -> text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW) + case DISTANCE_ERROR -> text("* Error obtaining version information", NamedTextColor.RED); // Purpur - Rebrand + case 0 -> text("* You are running the latest version", NamedTextColor.GREEN); // Purpur - Rebrand + case DISTANCE_UNKNOWN -> text("* Unknown version", NamedTextColor.YELLOW); // Purpur - Rebrand + default -> text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur - Rebrand .append(Component.newline()) .append(text("Download the new version at: ") .append(text(this.downloadPage, NamedTextColor.GOLD) // Gale - branding changes - version fetcher @@ -149,6 +149,6 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher { return null; } - return text("Previous version: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); + return text("Previous: " + oldVersion, NamedTextColor.GRAY, TextDecoration.ITALIC); // Purpur - Rebrand } } diff --git a/leaf-archived-patches/unapplied/src/main/java/su/plo/matter/Globals.java b/leaf-server/src/main/java/su/plo/matter/Globals.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/su/plo/matter/Globals.java rename to leaf-server/src/main/java/su/plo/matter/Globals.java diff --git a/leaf-archived-patches/unapplied/src/main/java/su/plo/matter/Hashing.java b/leaf-server/src/main/java/su/plo/matter/Hashing.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/su/plo/matter/Hashing.java rename to leaf-server/src/main/java/su/plo/matter/Hashing.java diff --git a/leaf-archived-patches/unapplied/src/main/java/su/plo/matter/WorldgenCryptoRandom.java b/leaf-server/src/main/java/su/plo/matter/WorldgenCryptoRandom.java similarity index 100% rename from leaf-archived-patches/unapplied/src/main/java/su/plo/matter/WorldgenCryptoRandom.java rename to leaf-server/src/main/java/su/plo/matter/WorldgenCryptoRandom.java