diff --git a/patches/server/0009-Fakeplayer-support.patch b/patches/server/0009-Fakeplayer-support.patch index 21c0161f..66308b65 100644 --- a/patches/server/0009-Fakeplayer-support.patch +++ b/patches/server/0009-Fakeplayer-support.patch @@ -194,6 +194,43 @@ index 15fb5ee374b19366ebb23181896fb943e95819f0..07886228e5a9536908b8480e8bf585bb public int timeUntilLured; private int timeUntilHooked; private float fishAngle; +diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +index 143977055717c2fe27df76231da304e2863b8f1f..4226e20dc91087f31c44e0ea7d0e8d06ec6facc8 100644 +--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java ++++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +@@ -406,6 +406,8 @@ public abstract class AbstractContainerMenu { + ItemStack itemstack1; + int l; + ++ if (!doClickCheck(slotIndex, button, actionType, player)) return; // Leaves - doClick check ++ + if (actionType == ClickType.QUICK_CRAFT) { + int i1 = this.quickcraftStatus; + +@@ -676,6 +678,23 @@ public abstract class AbstractContainerMenu { + + } + ++ // Leaves start - doClick check ++ private boolean doClickCheck(int slotIndex, int button, ClickType actionType, Player player) { ++ if (slotIndex < 0) { ++ return true; ++ } ++ ++ Slot slot = getSlot(slotIndex); ++ ItemStack itemStack = slot.getItem(); ++ if (itemStack.getTag() != null) { ++ if (itemStack.getTag().get("Leaves.Gui.Placeholder") != null) { ++ return !itemStack.getTag().getBoolean("Leaves.Gui.Placeholder"); ++ } ++ } ++ return true; ++ } ++ // Leaves end - doClick check ++ + private boolean tryItemClickBehaviourOverride(Player player, ClickAction clickType, Slot slot, ItemStack stack, ItemStack cursorStack) { + FeatureFlagSet featureflagset = player.getLevel().enabledFeatures(); + diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 750ac80eed6ba03e138dd4c03f57ddfe4a123276..f285a5a3f8a6b793452f872bc53b4aeeb5c3d383 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -222,7 +259,7 @@ index 750ac80eed6ba03e138dd4c03f57ddfe4a123276..f285a5a3f8a6b793452f872bc53b4aee } // Water Animals diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 1fb25e8a21b568864974cc81b452ba062890d593..3ca5c504cd8c85f300e1df747a9a3740b67e2530 100644 +index 1fb25e8a21b568864974cc81b452ba062890d593..67337e7daefec0fa710ea0df0e8cfeb81d957972 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -7,6 +7,8 @@ import org.bukkit.Bukkit; @@ -272,7 +309,7 @@ index 1fb25e8a21b568864974cc81b452ba062890d593..3ca5c504cd8c85f300e1df747a9a3740 public static boolean playerCanEditSign = true; private static void playerCanEditSign() { playerCanEditSign = getBoolean("settings.modify.player-can-edit-sign", playerCanEditSign); -@@ -146,6 +162,23 @@ public final class LeavesConfig { +@@ -146,6 +162,25 @@ public final class LeavesConfig { snowballAndEggCanKnockback = getBoolean("settings.modify.snowball-and-egg-can-knockback-player", snowballAndEggCanKnockback); } @@ -283,6 +320,7 @@ index 1fb25e8a21b568864974cc81b452ba062890d593..3ca5c504cd8c85f300e1df747a9a3740 + public static String fakeplayerSuffix = ""; + public static boolean alwaysSendFakeplayerData = true; + public static boolean fakeplayerResident = false; ++ public static boolean openFakeplayerInventory = false; + private static void fakeplayer() { + fakeplayerSupport = getBoolean("settings.modify.fakeplayer.enable", fakeplayerSupport); + unableFakeplayerNames = getList("settings.modify.fakeplayer.unable-fakeplayer-names", unableFakeplayerNames); @@ -291,6 +329,7 @@ index 1fb25e8a21b568864974cc81b452ba062890d593..3ca5c504cd8c85f300e1df747a9a3740 + fakeplayerSuffix = getString("settings.modify.fakeplayer.suffix", fakeplayerSuffix); + alwaysSendFakeplayerData = getBoolean("settings.modify.fakeplayer.always-send-data", alwaysSendFakeplayerData); + fakeplayerResident = getBoolean("settings.modify.fakeplayer.resident-fakeplayer", fakeplayerResident); ++ openFakeplayerInventory = getBoolean("settings.modify.fakeplayer.open-fakeplayer-inventory", openFakeplayerInventory); + } + public static final class WorldConfig { @@ -524,6 +563,189 @@ index 0000000000000000000000000000000000000000..6b7fb541d4d1fb6d4f3239ec59da26e3 + return string.substring(1, string.length() - 1); + } +} +diff --git a/src/main/java/top/leavesmc/leaves/bot/BotInventoryContainer.java b/src/main/java/top/leavesmc/leaves/bot/BotInventoryContainer.java +new file mode 100644 +index 0000000000000000000000000000000000000000..566905463d6a086e051db94ef10bbef148ccb5b8 +--- /dev/null ++++ b/src/main/java/top/leavesmc/leaves/bot/BotInventoryContainer.java +@@ -0,0 +1,177 @@ ++package top.leavesmc.leaves.bot; ++ ++import com.google.common.collect.ImmutableList; ++import com.mojang.datafixers.util.Pair; ++import net.minecraft.core.NonNullList; ++import net.minecraft.network.chat.Component; ++import net.minecraft.world.ContainerHelper; ++import net.minecraft.world.SimpleContainer; ++import net.minecraft.world.entity.player.Player; ++import net.minecraft.world.item.ItemStack; ++import net.minecraft.world.item.Items; ++ ++import javax.annotation.Nonnull; ++import java.util.List; ++ ++// Power by gugle-carpet-addition(https://github.com/Gu-ZT/gugle-carpet-addition) ++public class BotInventoryContainer extends SimpleContainer { ++ ++ public final NonNullList items; ++ public final NonNullList armor; ++ public final NonNullList offhand; ++ private final List> compartments; ++ private final NonNullList buttons = NonNullList.withSize(13, ItemStack.EMPTY); ++ private final ServerBot player; ++ ++ public BotInventoryContainer(ServerBot player) { ++ this.player = player; ++ this.items = this.player.getInventory().items; ++ this.armor = this.player.getInventory().armor; ++ this.offhand = this.player.getInventory().offhand; ++ this.compartments = ImmutableList.of(this.items, this.armor, this.offhand, this.buttons); ++ createButton(); ++ } ++ ++ @Override ++ public int getContainerSize() { ++ return this.items.size() + this.armor.size() + this.offhand.size() + this.buttons.size(); ++ } ++ ++ @Override ++ public boolean isEmpty() { ++ for (ItemStack itemStack : this.items) { ++ if (itemStack.isEmpty()) { ++ continue; ++ } ++ return false; ++ } ++ for (ItemStack itemStack : this.armor) { ++ if (itemStack.isEmpty()) { ++ continue; ++ } ++ return false; ++ } ++ for (ItemStack itemStack : this.offhand) { ++ if (itemStack.isEmpty()) { ++ continue; ++ } ++ return false; ++ } ++ return true; ++ } ++ ++ @Override ++ @Nonnull ++ public ItemStack getItem(int slot) { ++ Pair, Integer> pair = getItemSlot(slot); ++ if (pair != null) { ++ return pair.getFirst().get(pair.getSecond()); ++ } else { ++ return ItemStack.EMPTY; ++ } ++ } ++ ++ public Pair, Integer> getItemSlot(int slot) { ++ switch (slot) { ++ case 0 -> { ++ return new Pair<>(buttons, 0); ++ } ++ case 1, 2, 3, 4 -> { ++ return new Pair<>(armor, 4 - slot); ++ } ++ case 5, 6 -> { ++ return new Pair<>(buttons, slot - 4); ++ } ++ case 7 -> { ++ return new Pair<>(offhand, 0); ++ } ++ case 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 -> { ++ return new Pair<>(buttons, slot - 5); ++ } ++ case 18, 19, 20, 21, 22, 23, 24, 25, 26, ++ 27, 28, 29, 30, 31, 32, 33, 34, 35, ++ 36, 37, 38, 39, 40, 41, 42, 43, 44 -> { ++ return new Pair<>(items, slot - 9); ++ } ++ case 45, 46, 47, 48, 49, 50, 51, 52, 53 -> { ++ return new Pair<>(items, slot - 45); ++ } ++ default -> { ++ return null; ++ } ++ } ++ } ++ ++ @Override ++ @Nonnull ++ public ItemStack removeItem(int slot, int amount) { ++ Pair, Integer> pair = getItemSlot(slot); ++ NonNullList list = null; ++ if (pair != null) { ++ list = pair.getFirst(); ++ slot = pair.getSecond(); ++ } ++ if (list != null && !list.get(slot).isEmpty()) { ++ return ContainerHelper.removeItem(list, slot, amount); ++ } ++ return ItemStack.EMPTY; ++ } ++ ++ @Override ++ @Nonnull ++ public ItemStack removeItemNoUpdate(int slot) { ++ Pair, Integer> pair = getItemSlot(slot); ++ NonNullList list = null; ++ if (pair != null) { ++ list = pair.getFirst(); ++ slot = pair.getSecond(); ++ } ++ if (list != null && !list.get(slot).isEmpty()) { ++ ItemStack itemStack = list.get(slot); ++ list.set(slot, ItemStack.EMPTY); ++ return itemStack; ++ } ++ return ItemStack.EMPTY; ++ } ++ ++ @Override ++ public void setItem(int slot, @Nonnull ItemStack stack) { ++ Pair, Integer> pair = getItemSlot(slot); ++ NonNullList list = null; ++ if (pair != null) { ++ list = pair.getFirst(); ++ slot = pair.getSecond(); ++ } ++ if (list != null) { ++ list.set(slot, stack); ++ } ++ } ++ ++ @Override ++ public void setChanged() { ++ } ++ ++ @Override ++ public boolean stillValid(@Nonnull Player player) { ++ if (this.player.isRemoved()) { ++ return false; ++ } ++ return !(player.distanceToSqr(this.player) > 64.0); ++ } ++ ++ @Override ++ public void clearContent() { ++ for (List list : this.compartments) { ++ list.clear(); ++ } ++ } ++ ++ private void createButton() { ++ for (int i = 0; i < 13; i++) { ++ ItemStack button = new ItemStack(Items.STRUCTURE_VOID); ++ button.setHoverName(Component.empty()); ++ button.getOrCreateTag().putBoolean("Leaves.Gui.Placeholder", true); ++ buttons.set(i, button); ++ } ++ } ++} diff --git a/src/main/java/top/leavesmc/leaves/bot/BotStatsCounter.java b/src/main/java/top/leavesmc/leaves/bot/BotStatsCounter.java new file mode 100644 index 0000000000000000000000000000000000000000..07b688d376a4af88305e57519a5ae983ed7d91d3 @@ -720,10 +942,10 @@ index 0000000000000000000000000000000000000000..d6466ee4db637106e1394bb462d875e5 +} diff --git a/src/main/java/top/leavesmc/leaves/bot/ServerBot.java b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java new file mode 100644 -index 0000000000000000000000000000000000000000..0dbaf5f409a616e20286cdba93846268d60f1e4a +index 0000000000000000000000000000000000000000..f3d5b3c4189784e2eff852a23e1c4d6d159b2045 --- /dev/null +++ b/src/main/java/top/leavesmc/leaves/bot/ServerBot.java -@@ -0,0 +1,759 @@ +@@ -0,0 +1,779 @@ +package top.leavesmc.leaves.bot; + +import com.google.common.collect.Lists; @@ -755,12 +977,16 @@ index 0000000000000000000000000000000000000000..0dbaf5f409a616e20286cdba93846268 +import net.minecraft.stats.ServerStatsCounter; +import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; ++import net.minecraft.world.InteractionResult; ++import net.minecraft.world.SimpleMenuProvider; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.MoverType; +import net.minecraft.world.entity.item.ItemEntity; ++import net.minecraft.world.entity.player.Player; ++import net.minecraft.world.inventory.ChestMenu; +import net.minecraft.world.level.storage.LevelResource; +import net.minecraft.world.phys.AABB; +import net.minecraft.world.phys.Vec3; @@ -825,6 +1051,8 @@ index 0000000000000000000000000000000000000000..0dbaf5f409a616e20286cdba93846268 + private final ServerStatsCounter stats; + public final String skinName; + ++ private final BotInventoryContainer container; ++ + private static final List bots = new ArrayList<>(); + private static final Plugin MINECRAFT_PLUGIN = new MinecraftInternalPlugin(); + @@ -846,6 +1074,7 @@ index 0000000000000000000000000000000000000000..0dbaf5f409a616e20286cdba93846268 + this.removeOnDeath = true; + this.stats = new BotStatsCounter(server); + this.skinName = skinName; ++ this.container = new BotInventoryContainer(this); + server.getPlayerList().addNewBot(this); + } + @@ -1391,6 +1620,19 @@ index 0000000000000000000000000000000000000000..0dbaf5f409a616e20286cdba93846268 + return stats; + } + ++ public BotInventoryContainer getContainer() { ++ return container; ++ } ++ ++ @Override ++ public @NotNull InteractionResult interact(@NotNull Player player, @NotNull InteractionHand hand) { ++ if (LeavesConfig.openFakeplayerInventory) { ++ player.openMenu(new SimpleMenuProvider((i, inventory, p) -> ChestMenu.sixRows(i, inventory, container), getDisplayName())); ++ return InteractionResult.SUCCESS; ++ } ++ return super.interact(player, hand); ++ } ++ + public static ServerBot getBot(ServerPlayer player) { + ServerBot bot = null; + for (ServerBot b : bots) { diff --git a/patches/server/0010-Make-shears-in-dispenser-can-unlimited-use.patch b/patches/server/0010-Make-shears-in-dispenser-can-unlimited-use.patch index 72aa5144..1fcdea0f 100644 --- a/patches/server/0010-Make-shears-in-dispenser-can-unlimited-use.patch +++ b/patches/server/0010-Make-shears-in-dispenser-can-unlimited-use.patch @@ -18,7 +18,7 @@ index d1127d93a85a837933d0d73c24cacac4adc3a5b9..bca725f614893458f825768e8dfb6ff9 } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index a3aceccc7f2d1e8a525ac849c3818d8de4047ed1..5c9f5ef69f075ae10a92049a67605cbc63aea4c6 100644 +index 67337e7daefec0fa710ea0df0e8cfeb81d957972..bfef6cd885d538f831a481c7a22e12ede149a29a 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -104,10 +104,12 @@ public final class LeavesConfig { @@ -34,8 +34,8 @@ index a3aceccc7f2d1e8a525ac849c3818d8de4047ed1..5c9f5ef69f075ae10a92049a67605cbc } } -@@ -179,6 +181,11 @@ public final class LeavesConfig { - fakeplayerResident = getBoolean("settings.modify.fakeplayer.resident-fakeplayer", fakeplayerResident); +@@ -181,6 +183,11 @@ public final class LeavesConfig { + openFakeplayerInventory = getBoolean("settings.modify.fakeplayer.open-fakeplayer-inventory", openFakeplayerInventory); } + public static boolean shearsInDispenserCanZeroAmount = false; diff --git a/patches/server/0011-Redstone-Shears-Wrench.patch b/patches/server/0011-Redstone-Shears-Wrench.patch index 1bf51099..f6b28605 100644 --- a/patches/server/0011-Redstone-Shears-Wrench.patch +++ b/patches/server/0011-Redstone-Shears-Wrench.patch @@ -98,7 +98,7 @@ index e77af779c77de6d5580c13699df3e7d890fe7aba..c9310e88b3a967cb9cacb80288e74757 + // Leaves end - shears wrench } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 5c9f5ef69f075ae10a92049a67605cbc63aea4c6..f5a0193e581a875039ab27cc23acc4be3d0772f3 100644 +index bfef6cd885d538f831a481c7a22e12ede149a29a..e89efa1a5828ce2b97b99ab8dc22f16d74ca899a 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -105,11 +105,13 @@ public final class LeavesConfig { @@ -115,7 +115,7 @@ index 5c9f5ef69f075ae10a92049a67605cbc63aea4c6..f5a0193e581a875039ab27cc23acc4be } } -@@ -186,6 +188,11 @@ public final class LeavesConfig { +@@ -188,6 +190,11 @@ public final class LeavesConfig { shearsInDispenserCanZeroAmount = getBoolean("settings.modify.shears-in-dispenser-can-zero-amount", shearsInDispenserCanZeroAmount); } diff --git a/patches/server/0013-Budding-Amethyst-can-push-by-piston.patch b/patches/server/0013-Budding-Amethyst-can-push-by-piston.patch index c3f046d3..4788d008 100644 --- a/patches/server/0013-Budding-Amethyst-can-push-by-piston.patch +++ b/patches/server/0013-Budding-Amethyst-can-push-by-piston.patch @@ -21,7 +21,7 @@ index bedccb8717d08d5a60058445b04ddff149e7d36c..2b452ae8d26107973f503451164f65de } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f5a0193e581a875039ab27cc23acc4be3d0772f3..1a7f70fc937647486f87345c499cea5f243118d9 100644 +index e89efa1a5828ce2b97b99ab8dc22f16d74ca899a..049864517e9cd95d1d5aba17d3f90b71a4685b14 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -106,12 +106,14 @@ public final class LeavesConfig { @@ -39,7 +39,7 @@ index f5a0193e581a875039ab27cc23acc4be3d0772f3..1a7f70fc937647486f87345c499cea5f } } -@@ -193,6 +195,11 @@ public final class LeavesConfig { +@@ -195,6 +197,11 @@ public final class LeavesConfig { redstoneShearsWrench = getBoolean("settings.modify.redstone-shears-wrench", redstoneShearsWrench); } diff --git a/patches/server/0014-Spectator-dont-get-Advancement.patch b/patches/server/0014-Spectator-dont-get-Advancement.patch index 22712fdd..4fc0901c 100644 --- a/patches/server/0014-Spectator-dont-get-Advancement.patch +++ b/patches/server/0014-Spectator-dont-get-Advancement.patch @@ -29,7 +29,7 @@ index 8873e12cbd3d6f9071efedb35ea3c69c78033d78..1fdaa8a9993dd6881877a3b00b02487a AdvancementProgress advancementprogress = this.getOrStartProgress(advancement); boolean flag1 = advancementprogress.isDone(); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 1a7f70fc937647486f87345c499cea5f243118d9..eff8e2f83a52b2ec32b2b8cef04cb810ad229011 100644 +index 049864517e9cd95d1d5aba17d3f90b71a4685b14..4f7c6d8633a7cb75e61932ac02a74e06d0c2da70 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -107,6 +107,7 @@ public final class LeavesConfig { @@ -48,7 +48,7 @@ index 1a7f70fc937647486f87345c499cea5f243118d9..eff8e2f83a52b2ec32b2b8cef04cb810 } } -@@ -199,6 +201,11 @@ public final class LeavesConfig { +@@ -201,6 +203,11 @@ public final class LeavesConfig { private static void buddingAmethystCanPushByPiston() { buddingAmethystCanPushByPiston = getBoolean("settings.modify.budding-amethyst-can-push-by-piston", buddingAmethystCanPushByPiston); } diff --git a/patches/server/0015-Stick-can-change-ArmorStand-arm-status.patch b/patches/server/0015-Stick-can-change-ArmorStand-arm-status.patch index ebee07ba..c3ce40fa 100644 --- a/patches/server/0015-Stick-can-change-ArmorStand-arm-status.patch +++ b/patches/server/0015-Stick-can-change-ArmorStand-arm-status.patch @@ -22,7 +22,7 @@ index b136cdc13d94bc34c998a1986e0c93525356ac5c..a1dd65d71606e1da07be781bf95a3268 return InteractionResult.FAIL; } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index eff8e2f83a52b2ec32b2b8cef04cb810ad229011..5965ca2990caa88876be9b7a2400b24bd760193d 100644 +index 4f7c6d8633a7cb75e61932ac02a74e06d0c2da70..adee0164aaa55ebdef2281d8e46682da1ac88278 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -108,6 +108,7 @@ public final class LeavesConfig { @@ -41,7 +41,7 @@ index eff8e2f83a52b2ec32b2b8cef04cb810ad229011..5965ca2990caa88876be9b7a2400b24b } } -@@ -206,6 +208,11 @@ public final class LeavesConfig { +@@ -208,6 +210,11 @@ public final class LeavesConfig { private static void spectatorDontGetAdvancement() { spectatorDontGetAdvancement = getBoolean("settings.modify.spectator-dont-get-advancement", spectatorDontGetAdvancement); } diff --git a/patches/server/0017-No-chat-sign.patch b/patches/server/0017-No-chat-sign.patch index c4abec49..86c400e8 100644 --- a/patches/server/0017-No-chat-sign.patch +++ b/patches/server/0017-No-chat-sign.patch @@ -208,7 +208,7 @@ index d5014c1145dc25647d328835f7c93309adf8dd1a..a057f6fa87f76707cdef2615d5d49e32 // CraftBukkit start diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index c9ad5425161ad383cc6a41eff69c325e74e56973..14922eba73516e59ea99d02e632d1ba4f5ea901e 100644 +index adee0164aaa55ebdef2281d8e46682da1ac88278..937e84214223e978b3b6bc6107974c61e2d0f558 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -109,6 +109,7 @@ public final class LeavesConfig { @@ -227,7 +227,7 @@ index c9ad5425161ad383cc6a41eff69c325e74e56973..14922eba73516e59ea99d02e632d1ba4 } } -@@ -213,6 +215,15 @@ public final class LeavesConfig { +@@ -215,6 +217,15 @@ public final class LeavesConfig { private static void stickChangeArmorStandHasArm() { stickChangeArmorStandArmStatus = getBoolean("settings.modify.stick-change-armorstand-arm-status", stickChangeArmorStandArmStatus); } diff --git a/patches/server/0018-Optimize-mob-spawning.patch b/patches/server/0018-Optimize-mob-spawning.patch index 81e00a62..92c00d25 100644 --- a/patches/server/0018-Optimize-mob-spawning.patch +++ b/patches/server/0018-Optimize-mob-spawning.patch @@ -167,10 +167,10 @@ index 4cdfc433df67afcd455422e9baf56f167dd712ae..a6e0f5dab21d806e0c7744b2a337cded private void ensureActiveIsNotIterated() { // Paper - replace with better logic, do not delay removals diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 14922eba73516e59ea99d02e632d1ba4f5ea901e..837cb93316c90c6836dabfbb0c0d2f4c95ae4d27 100644 +index 937e84214223e978b3b6bc6107974c61e2d0f558..170f1f964e5cd3d1f1590106e31718dced04d0ef 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -224,7 +224,16 @@ public final class LeavesConfig { +@@ -226,7 +226,16 @@ public final class LeavesConfig { } noChatSign = getBoolean("settings.misc.no-chat-sign", noChatSign); } diff --git a/patches/server/0019-Dont-send-useless-entity-packets.patch b/patches/server/0019-Dont-send-useless-entity-packets.patch index 6a0f8aad..aa1bc964 100644 --- a/patches/server/0019-Dont-send-useless-entity-packets.patch +++ b/patches/server/0019-Dont-send-useless-entity-packets.patch @@ -69,10 +69,10 @@ index 190e9761087baec5827d722a8281f0ffb6798341..158da4c3b002a4948bfb214337aa28a5 this.entity.stopSeenByPlayer(player); player.connection.send(new ClientboundRemoveEntitiesPacket(new int[]{this.entity.getId()})); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 8e3864fcee86b7cdd8e3199cb27e590baf5f8aaf..56110e6f68a011d71d3f6a11ba19e433accc5e56 100644 +index 170f1f964e5cd3d1f1590106e31718dced04d0ef..76c382c839b904640cb92afa503d1aef1c29ffc6 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -234,6 +234,11 @@ public final class LeavesConfig { +@@ -236,6 +236,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0020-Multithreaded-Tracker.patch b/patches/server/0020-Multithreaded-Tracker.patch index d3118d3c..8f1e6ffa 100644 --- a/patches/server/0020-Multithreaded-Tracker.patch +++ b/patches/server/0020-Multithreaded-Tracker.patch @@ -174,10 +174,10 @@ index 158da4c3b002a4948bfb214337aa28a55b358fc9..2f8e77692811604fdc19bff6ba0faeea set.clear(); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 56110e6f68a011d71d3f6a11ba19e433accc5e56..5704d4165b032c6f2182e79647163921e93ce853 100644 +index 76c382c839b904640cb92afa503d1aef1c29ffc6..3c13acaae250ddc1480a7c846097cc187038cde4 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -239,6 +239,20 @@ public final class LeavesConfig { +@@ -241,6 +241,20 @@ public final class LeavesConfig { dontSendUselessEntityPackets = getBoolean("settings.performance.dont-send-useless-entity-packets", dontSendUselessEntityPackets); } diff --git a/patches/server/0021-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch b/patches/server/0021-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch index c90023bd..e83ac103 100644 --- a/patches/server/0021-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch +++ b/patches/server/0021-Fix-Paper-6045-block-goal-shouldn-t-load-chunks.patch @@ -18,10 +18,10 @@ index 26bf383caea68834c654b25653ced9017f1b1b22..71e3c7fc5c071e83dfeca6954771e559 this.blockPos = mutableBlockPos; setTargetPosition(mutableBlockPos.immutable()); // Paper diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 5704d4165b032c6f2182e79647163921e93ce853..384b89c86af39e9b1abd71936d6c3e69698050fc 100644 +index 3c13acaae250ddc1480a7c846097cc187038cde4..78fdad3bd377da395be17efa1c20b30b427730cc 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -253,6 +253,11 @@ public final class LeavesConfig { +@@ -255,6 +255,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0022-Optimize-entity-coordinate-key.patch b/patches/server/0022-Optimize-entity-coordinate-key.patch index c1d9fe78..858230e0 100644 --- a/patches/server/0022-Optimize-entity-coordinate-key.patch +++ b/patches/server/0022-Optimize-entity-coordinate-key.patch @@ -38,10 +38,10 @@ index 43873929f11e373186190b3ae831dc68bfa69616..2433315c13e2da90f4f208d180d487c9 private Vec3 deltaMovement; private float yRot; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index f5df3de5f9257ac239c454a5105b88fb639ff1e0..4447d3bef45c71e9899ea6cf13d50904e315544f 100644 +index 78fdad3bd377da395be17efa1c20b30b427730cc..e80ab1fcd4d7a1a8b607ea17c4f4da8c6eb419b6 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -258,6 +258,12 @@ public final class LeavesConfig { +@@ -260,6 +260,12 @@ public final class LeavesConfig { fixPaper6045 = getBoolean("settings.performance.fix.fix-paper-6045", fixPaper6045); } diff --git a/patches/server/0023-Optimize-suffocation.patch b/patches/server/0023-Optimize-suffocation.patch index f973d597..20a2cf3f 100644 --- a/patches/server/0023-Optimize-suffocation.patch +++ b/patches/server/0023-Optimize-suffocation.patch @@ -35,10 +35,10 @@ index f577dcc95bba43a2aa8a3a54b3afbcf50e93d52b..42f89171251a5f2dcd6e75eaa1135b34 public boolean hurt(DamageSource source, float amount) { if (this.isInvulnerableTo(source)) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index fbf828219bf9712e3baff1196cf9bfc85de58d4e..0ccfd68c1ad10dd5c8c8c875e6db77efc7981ea9 100644 +index e80ab1fcd4d7a1a8b607ea17c4f4da8c6eb419b6..00f49a8d6fa8fc460d276f31170d3379f06199bb 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -263,6 +263,10 @@ public final class LeavesConfig { +@@ -265,6 +265,10 @@ public final class LeavesConfig { optimizeEntityCoordinateKey = getBoolean("settings.performance.optimize-entity-coordinate-key", optimizeEntityCoordinateKey); } diff --git a/patches/server/0024-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0024-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch index 538bfc43..1eed61fe 100644 --- a/patches/server/0024-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch +++ b/patches/server/0024-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch @@ -46,7 +46,7 @@ index d1eefa6ef3e9abfe7af4d8310aa64465fa2d5463..c91735828dc99af0b880a5a105025b42 default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) { // Paper start - Prevent raytrace from loading chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 856055eeac058290b9b2146a11f5faccd1873df0..3fd487f9302f428171539e18f09f05c93037fab1 100644 +index 5efece112550148d04f641249bee3221c6375c93..7bd8998048a5505331fdd2870570351137b1a6be 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -409,6 +409,91 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -142,10 +142,10 @@ index 856055eeac058290b9b2146a11f5faccd1873df0..3fd487f9302f428171539e18f09f05c9 return pos.isInsideBuildHeightAndWorldBoundsHorizontal(this); // Paper - use better/optimized check } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 0ccfd68c1ad10dd5c8c8c875e6db77efc7981ea9..e75b3dcddd28c8ed462cfa324177ce042d4bfac2 100644 +index 00f49a8d6fa8fc460d276f31170d3379f06199bb..ce433db220fa43111ab72e27c932cacf2ed03178 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -268,6 +268,11 @@ public final class LeavesConfig { +@@ -270,6 +270,11 @@ public final class LeavesConfig { enableSuffocationOptimization = getBoolean("settings.performance.enable-suffocation-optimization", enableSuffocationOptimization); } diff --git a/patches/server/0025-Only-check-for-spooky-season-once-an-hour.patch b/patches/server/0025-Only-check-for-spooky-season-once-an-hour.patch index 5b43fa07..85ed95b4 100644 --- a/patches/server/0025-Only-check-for-spooky-season-once-an-hour.patch +++ b/patches/server/0025-Only-check-for-spooky-season-once-an-hour.patch @@ -45,10 +45,10 @@ index 320c558bbe80d4bbc641e895ec43cfa2b45e8d70..f57572620288d8f0e024d43a4e11e212 @Override protected float getStandingEyeHeight(Pose pose, EntityDimensions dimensions) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index e75b3dcddd28c8ed462cfa324177ce042d4bfac2..a0f0f343b5fcb26a4b30e0ac669e9e0c7c1f41a9 100644 +index ce433db220fa43111ab72e27c932cacf2ed03178..240fe801ba2670f5986faa58b77c7902f0465fc6 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -273,6 +273,11 @@ public final class LeavesConfig { +@@ -275,6 +275,11 @@ public final class LeavesConfig { entityStripRaytracing = getBoolean("settings.performance.strip-raytracing-for-entity", entityStripRaytracing); } diff --git a/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch b/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch index 2cec3be0..fbf3fea3 100644 --- a/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch +++ b/patches/server/0027-Optimize-random-calls-in-chunk-ticking.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Optimize random calls in chunk ticking This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index 9aa8f02adf366dc532f40a376c1cefd36a60ed5c..bec0e0b9626fb1caa96af369e048d07596d17852 100644 +index 6a2adfe51b5ea6b3290349781f41ed7818f15fe5..928139e8d0f7b65e2376d3c89d7bea294e3ed3a2 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java @@ -708,6 +708,11 @@ public class ServerChunkCache extends ChunkSource { @@ -22,7 +22,7 @@ index 9aa8f02adf366dc532f40a376c1cefd36a60ed5c..bec0e0b9626fb1caa96af369e048d075 boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index aa81259696beafd04584ee9f5829e9d2e54be67e..c41ae38038fb0f9e2010c59bd25860c9051034bb 100644 +index b1950cd42cb7890309c1fb591110b6b9e4d37e51..03a4e114a3383ce779a6fc48747834b33b480f66 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -796,6 +796,13 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -93,10 +93,10 @@ index 28e4b302284f955a73e75d0f4276d55fb51826f5..1bf1af06fbd6501e98def7997c487c42 public org.bukkit.Chunk bukkitChunk; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index a0f0f343b5fcb26a4b30e0ac669e9e0c7c1f41a9..6820cfaef561f337c66b5fd67b6c28b965b72e6f 100644 +index 240fe801ba2670f5986faa58b77c7902f0465fc6..64215f03789db0555422c4b0aec32c8a4504cb4d 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -278,6 +278,15 @@ public final class LeavesConfig { +@@ -280,6 +280,15 @@ public final class LeavesConfig { checkSpookySeasonOnceAnHour = getBoolean("settings.performance.check-spooky-season-once-an-hour", checkSpookySeasonOnceAnHour); } diff --git a/patches/server/0028-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0028-Skip-POI-finding-if-stuck-in-vehicle.patch index 94636199..c630e344 100644 --- a/patches/server/0028-Skip-POI-finding-if-stuck-in-vehicle.patch +++ b/patches/server/0028-Skip-POI-finding-if-stuck-in-vehicle.patch @@ -22,10 +22,10 @@ index d4c91e0a0c64fcb7f1145de3f30134cb1f1f8ee6..44fc394dbab7e05a3bd7cab493300a96 long2ObjectMap.long2ObjectEntrySet().removeIf((entry) -> { return !entry.getValue().isStillValid(time); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 6820cfaef561f337c66b5fd67b6c28b965b72e6f..33d7872fd42f356d91ce5c54d5d2901abdd240f3 100644 +index 64215f03789db0555422c4b0aec32c8a4504cb4d..020659f8555e43dd71cea39747bd8f8fe8a6c5a4 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -287,6 +287,11 @@ public final class LeavesConfig { +@@ -289,6 +289,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0029-Early-return-optimization-for-target-finding.patch b/patches/server/0029-Early-return-optimization-for-target-finding.patch index 521f5b8d..cab4a0df 100644 --- a/patches/server/0029-Early-return-optimization-for-target-finding.patch +++ b/patches/server/0029-Early-return-optimization-for-target-finding.patch @@ -29,10 +29,10 @@ index a7575b5ef56af6f53448d391abb4956e130148ca..e2764cbc888be39943728ff810e1e44b return false; } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 33d7872fd42f356d91ce5c54d5d2901abdd240f3..41c8ba388c1a2026fce9765344da2324d487a81a 100644 +index 020659f8555e43dd71cea39747bd8f8fe8a6c5a4..076074b70f95141011b3f71948b9d2581306db4e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -291,6 +291,11 @@ public final class LeavesConfig { +@@ -293,6 +293,11 @@ public final class LeavesConfig { private static void skipPOIFindingInVehicle() { skipPOIFindingInVehicle = getBoolean("settings.performance.skip-poi-find-in-vehicle", skipPOIFindingInVehicle); } diff --git a/patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch b/patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch index 481a82a3..a0ec02cb 100644 --- a/patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch +++ b/patches/server/0030-Use-thread-unsafe-random-for-mob-spawning.patch @@ -38,10 +38,10 @@ index dca0d9611593a0f3b921b314b4b458cc95f08ebc..612d536f8a1b4e45d7431dc8bbd1c7aa public static boolean isValidEmptySpawnBlock(BlockGetter blockView, BlockPos pos, BlockState state, FluidState fluidState, EntityType entityType) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 41c8ba388c1a2026fce9765344da2324d487a81a..c651fea47720c49af4ff3f4af192c878b98c2453 100644 +index 076074b70f95141011b3f71948b9d2581306db4e..ba58171708fd3362fe76af608d657e94fd2b3c01 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -297,6 +297,11 @@ public final class LeavesConfig { +@@ -299,6 +299,11 @@ public final class LeavesConfig { entityTargetFindingOptimization = getBoolean("settings.performance.entity-target-find-optimization", entityTargetFindingOptimization); } diff --git a/patches/server/0031-Config-to-disable-method-profiler.patch b/patches/server/0031-Config-to-disable-method-profiler.patch index 1e187864..d8321df0 100644 --- a/patches/server/0031-Config-to-disable-method-profiler.patch +++ b/patches/server/0031-Config-to-disable-method-profiler.patch @@ -38,10 +38,10 @@ index de84dbe7e079fe9776ef7a8c21c12487fcd736ba..f22d1a2a8a1dbb1b2294dfcaddcac24b } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index fb96902ed270c522e875edee637e78e30d2a6ace..2e9eb5850df2e6977894d8c06054288e967d24f1 100644 +index ba58171708fd3362fe76af608d657e94fd2b3c01..ff9b8b801d923e0402456987c5d71a46080982fa 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -302,6 +302,11 @@ public final class LeavesConfig { +@@ -304,6 +304,11 @@ public final class LeavesConfig { useMoreThreadUnsafeRandom = getBoolean("settings.performance.use-more-thread-unsafe-random", useMoreThreadUnsafeRandom); } diff --git a/patches/server/0032-Throttle-goal-selector-during-inactive-ticking.patch b/patches/server/0032-Throttle-goal-selector-during-inactive-ticking.patch index eb0a8da0..7534f86a 100644 --- a/patches/server/0032-Throttle-goal-selector-during-inactive-ticking.patch +++ b/patches/server/0032-Throttle-goal-selector-during-inactive-ticking.patch @@ -25,10 +25,10 @@ index 49b983064ea810382b6112f5dc7f93ba4e5710bd..3948d4c6bf1f3942b6496ee2a8876665 } if (this.targetSelector.inactiveTick()) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 636944381a41af0416efd821d5cfc20cb6bfdac9..3df8b025fce50491c644bde0e8b05c3d5329a8c6 100644 +index ff9b8b801d923e0402456987c5d71a46080982fa..e90760d8b4657265e70f73c62623702175dcf4ee 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -307,6 +307,11 @@ public final class LeavesConfig { +@@ -309,6 +309,11 @@ public final class LeavesConfig { disableMethodProfiler = getBoolean("settings.misc.disable-method-profiler", disableMethodProfiler); } diff --git a/patches/server/0033-Skip-cloning-loot-parameters.patch b/patches/server/0033-Skip-cloning-loot-parameters.patch index 990fbdfd..4e5701f6 100644 --- a/patches/server/0033-Skip-cloning-loot-parameters.patch +++ b/patches/server/0033-Skip-cloning-loot-parameters.patch @@ -28,10 +28,10 @@ index 35f9b11a3a61976c952a2c1c64bb2a932538f54f..5d678cfca0a39aeed0881c3a38828fdc public boolean hasParam(LootContextParam parameter) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 3df8b025fce50491c644bde0e8b05c3d5329a8c6..8570b5d9ca7aa0e9253d3e481c68fe13c8df25f4 100644 +index e90760d8b4657265e70f73c62623702175dcf4ee..d373eebef63a6f3edd0cdee1d06e2a992678b362 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -312,6 +312,11 @@ public final class LeavesConfig { +@@ -314,6 +314,11 @@ public final class LeavesConfig { throttleInactiveGoalSelectorTick = getBoolean("settings.performance.inactive-goal-selector-disable", throttleInactiveGoalSelectorTick); } diff --git a/patches/server/0034-Reduce-entity-allocations.patch b/patches/server/0034-Reduce-entity-allocations.patch index fce4ca1d..9bac2d67 100644 --- a/patches/server/0034-Reduce-entity-allocations.patch +++ b/patches/server/0034-Reduce-entity-allocations.patch @@ -54,10 +54,10 @@ index dd1102d5291ef6f18e82400a6d8a0a376cc071e9..53c094c8a674b2842009727569e7e1f6 @Nullable diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 8570b5d9ca7aa0e9253d3e481c68fe13c8df25f4..c51f15356dd018925afe3c3c877f410d0e9966fe 100644 +index d373eebef63a6f3edd0cdee1d06e2a992678b362..80f8fdaf3b9b208580422645d3fe3016da4f2b0e 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -317,6 +317,11 @@ public final class LeavesConfig { +@@ -319,6 +319,11 @@ public final class LeavesConfig { skipCloneLootParameters = getBoolean("settings.performance.skip-clone-loot-parameters", skipCloneLootParameters); } diff --git a/patches/server/0035-Remove-lambda-from-ticking-guard.patch b/patches/server/0035-Remove-lambda-from-ticking-guard.patch index b474af29..60e7ca89 100644 --- a/patches/server/0035-Remove-lambda-from-ticking-guard.patch +++ b/patches/server/0035-Remove-lambda-from-ticking-guard.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove lambda from ticking guard This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index c41ae38038fb0f9e2010c59bd25860c9051034bb..1b17976702676755c986512507bfc3228891e383 100644 +index 03a4e114a3383ce779a6fc48747834b33b480f66..09f6622d9e45e16d1147a43f579d2ec7092ad4d3 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -728,7 +728,24 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -36,10 +36,10 @@ index c41ae38038fb0f9e2010c59bd25860c9051034bb..1b17976702676755c986512507bfc322 } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index c51f15356dd018925afe3c3c877f410d0e9966fe..322367cd087a14ce6bff2ca14ff792bd12bb1ad4 100644 +index 80f8fdaf3b9b208580422645d3fe3016da4f2b0e..345b9ef0af9f8f08af00693e562e5f39a8ad3362 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -322,6 +322,11 @@ public final class LeavesConfig { +@@ -324,6 +324,11 @@ public final class LeavesConfig { reduceEntityAllocations = getBoolean("settings.performance.reduce-entity-allocations", reduceEntityAllocations); } diff --git a/patches/server/0036-Remove-iterators-from-inventory-contains.patch b/patches/server/0036-Remove-iterators-from-inventory-contains.patch index 2ede32e2..7eeddf3d 100644 --- a/patches/server/0036-Remove-iterators-from-inventory-contains.patch +++ b/patches/server/0036-Remove-iterators-from-inventory-contains.patch @@ -55,10 +55,10 @@ index 5bc033bf59d49eda1f8f2574165bbcbeab7faa0f..cf89cbffabf8b88265b5ffbc42b55fe6 } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 322367cd087a14ce6bff2ca14ff792bd12bb1ad4..0582366bef7fdf57a1ebc3c01ac68be41d0bf3ac 100644 +index 345b9ef0af9f8f08af00693e562e5f39a8ad3362..a5fece21769900d5600df3284b7d3191121f10a5 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -327,6 +327,11 @@ public final class LeavesConfig { +@@ -329,6 +329,11 @@ public final class LeavesConfig { removeTickGuardLambda = getBoolean("settings.performance.remove.tick-guard-lambda", removeTickGuardLambda); } diff --git a/patches/server/0037-Remove-streams-from-getting-nearby-players.patch b/patches/server/0037-Remove-streams-from-getting-nearby-players.patch index bd1b4613..0975677f 100644 --- a/patches/server/0037-Remove-streams-from-getting-nearby-players.patch +++ b/patches/server/0037-Remove-streams-from-getting-nearby-players.patch @@ -68,10 +68,10 @@ index 818952b1268688cf13a8ab22d38f05336bf740ad..c55eb9ef7217405c35661dbe03ae6be8 return chunkMap.playerEntityTrackerTrackMaps[type.ordinal()].getObjectsInRange(MCUtil.getCoordinateKey(this)); } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 0582366bef7fdf57a1ebc3c01ac68be41d0bf3ac..26e99556e99dfbb02419190bee3a72a2ed12b350 100644 +index a5fece21769900d5600df3284b7d3191121f10a5..06852bda6703c077ce5b4d6bd0eaceb413e52888 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -332,6 +332,11 @@ public final class LeavesConfig { +@@ -334,6 +334,11 @@ public final class LeavesConfig { removeInventoryContainsIterators = getBoolean("settings.performance.remove.inventory-contains-iterators", removeInventoryContainsIterators); } diff --git a/patches/server/0038-Remove-streams-and-iterators-from-range-check.patch b/patches/server/0038-Remove-streams-and-iterators-from-range-check.patch index c0ef1921..572cbbf1 100644 --- a/patches/server/0038-Remove-streams-and-iterators-from-range-check.patch +++ b/patches/server/0038-Remove-streams-and-iterators-from-range-check.patch @@ -65,10 +65,10 @@ index 634cde8069fc5ba467170a597e02da7c6b4e7b80..893475f58f649a40e3962092a3608636 return this.scaledRange(i); } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 26e99556e99dfbb02419190bee3a72a2ed12b350..7a66aba1ccb7182679e786688519aadc01ccec1f 100644 +index 06852bda6703c077ce5b4d6bd0eaceb413e52888..317ec81396bebd72ba1b3c0cfcb421a960e32268 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -337,6 +337,11 @@ public final class LeavesConfig { +@@ -339,6 +339,11 @@ public final class LeavesConfig { removeGetNearPlayerStreams = getBoolean("settings.performance.remove.get-nearby-players-streams", removeGetNearPlayerStreams); } diff --git a/patches/server/0039-Async-Pathfinding.patch b/patches/server/0039-Async-Pathfinding.patch index b9530c4a..52adf67b 100644 --- a/patches/server/0039-Async-Pathfinding.patch +++ b/patches/server/0039-Async-Pathfinding.patch @@ -7,10 +7,10 @@ This patch is Powered by Pufferfish(https://github.com/pufferfish-gg/Pufferfish) But Pufferfish patch was ported downstream from the Petal fork diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 7a66aba1ccb7182679e786688519aadc01ccec1f..7dfe1efadcb62ec304c02bf0b1ec1d93ae9205ae 100644 +index 317ec81396bebd72ba1b3c0cfcb421a960e32268..ab7613a1ccfc6117f8b4eed72bdaa6730b8238d3 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -342,6 +342,21 @@ public final class LeavesConfig { +@@ -344,6 +344,21 @@ public final class LeavesConfig { removeRangeCheckStreams = getBoolean("settings.performance.remove.range-check-streams-and-iterators", removeRangeCheckStreams); } diff --git a/patches/server/0040-Cache-climbing-check-for-activation.patch b/patches/server/0040-Cache-climbing-check-for-activation.patch index 8bc7c75c..4b7e0f46 100644 --- a/patches/server/0040-Cache-climbing-check-for-activation.patch +++ b/patches/server/0040-Cache-climbing-check-for-activation.patch @@ -46,10 +46,10 @@ index e881584d38dc354204479863f004e974a0ac6c07..9f17c6acb54a7620656832df62e57e9d return 1; // Paper } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 7dfe1efadcb62ec304c02bf0b1ec1d93ae9205ae..2858a2f2d755cffd2e87f58a3468e45a35b5abe9 100644 +index ab7613a1ccfc6117f8b4eed72bdaa6730b8238d3..136bd381e68318f5b2afd3616fb13e580aa0cc49 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -357,6 +357,11 @@ public final class LeavesConfig { +@@ -359,6 +359,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0041-Use-aging-cache-for-biome-temperatures.patch b/patches/server/0041-Use-aging-cache-for-biome-temperatures.patch index 47e9f5f6..68171311 100644 --- a/patches/server/0041-Use-aging-cache-for-biome-temperatures.patch +++ b/patches/server/0041-Use-aging-cache-for-biome-temperatures.patch @@ -102,10 +102,10 @@ index c4f1173aab1e53412a65793e06238e637910475a..44bb45b391a365d4ca4dcd7e284edbb0 public boolean shouldFreeze(LevelReader world, BlockPos blockPos) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 2858a2f2d755cffd2e87f58a3468e45a35b5abe9..e117229dc47cd953ec148ac4e4d518e2a2e8e9cb 100644 +index 136bd381e68318f5b2afd3616fb13e580aa0cc49..224ff765c57b65cea7dd46806ed57e82da42a3f8 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -362,6 +362,15 @@ public final class LeavesConfig { +@@ -364,6 +364,15 @@ public final class LeavesConfig { cacheClimbCheck = getBoolean("settings.performance.cache-climb-check", cacheClimbCheck); } diff --git a/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch b/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch index 4ec464f9..d5bc420d 100644 --- a/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch +++ b/patches/server/0042-Reduce-entity-fluid-lookups-if-no-fluids.patch @@ -217,10 +217,10 @@ index b0c9fce9d4e06cac139e341d218d0b6aac1f1943..f53fee91b78ba4c1e17360a40d5a94fe }); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index e117229dc47cd953ec148ac4e4d518e2a2e8e9cb..bab657dfc664da1c5fa2cea17069d08de7c378c8 100644 +index 224ff765c57b65cea7dd46806ed57e82da42a3f8..ac919b7b128e23c12e00956974220872cc3a4848 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -371,6 +371,11 @@ public final class LeavesConfig { +@@ -373,6 +373,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0043-Reduce-chunk-loading-lookups.patch b/patches/server/0043-Reduce-chunk-loading-lookups.patch index 10450cc8..197ae171 100644 --- a/patches/server/0043-Reduce-chunk-loading-lookups.patch +++ b/patches/server/0043-Reduce-chunk-loading-lookups.patch @@ -42,10 +42,10 @@ index f4002ac7cba7d5e41b4f11b98212c625f6a92a65..6feeb3d30e45c5aba4e8204fe7e76f8f boolean flag1 = iblockdata.getFluidState().is(FluidTags.WATER); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index bab657dfc664da1c5fa2cea17069d08de7c378c8..7c683f3f9e51cbcf1f451150d924a46c9f007068 100644 +index ac919b7b128e23c12e00956974220872cc3a4848..a2b13e51c96dc929ab3f0ddb89560398bbab23f5 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -376,6 +376,11 @@ public final class LeavesConfig { +@@ -378,6 +378,11 @@ public final class LeavesConfig { reduceEntityFluidLookup = getBoolean("settings.performance.reduce-entity-fluid-lookup", reduceEntityFluidLookup); } diff --git a/patches/server/0044-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch b/patches/server/0044-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch index c24bcbe7..9adb9598 100644 --- a/patches/server/0044-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch +++ b/patches/server/0044-Simpler-ShapelessRecipes-comparison-for-Vanilla.patch @@ -73,10 +73,10 @@ index f7ea77dd82d978ad307f99c743efacfb34478b3d..96be7a7b030b2f82ac91f0c5c8e66f28 } } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 7c683f3f9e51cbcf1f451150d924a46c9f007068..27d791fa3f1c78ca5e7c32fbbdb357503458b419 100644 +index a2b13e51c96dc929ab3f0ddb89560398bbab23f5..3207f4787b0bad1122825a9b491de03e768e16ad 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -381,6 +381,11 @@ public final class LeavesConfig { +@@ -383,6 +383,11 @@ public final class LeavesConfig { reduceChuckLoadAndLookup = getBoolean("settings.performance.reduce-chuck-load-and-lookup", reduceChuckLoadAndLookup); } diff --git a/patches/server/0045-PCA-sync-protocol.patch b/patches/server/0045-PCA-sync-protocol.patch index 094ae174..7928f4ee 100644 --- a/patches/server/0045-PCA-sync-protocol.patch +++ b/patches/server/0045-PCA-sync-protocol.patch @@ -369,10 +369,10 @@ index ba4a1f12c29cb28441ae316ff5e1f23358e6af02..8e9fb3731edc302ae472599f8e2d953d // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 03f618c9ba4f4f4c8ce4f3187be7e7fed8b6f8f8..29acea996719de0e1333e51df310678a7025267a 100644 +index 3207f4787b0bad1122825a9b491de03e768e16ad..a72995e1315fe492f4c2299a5d67b077ed094509 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -386,6 +386,21 @@ public final class LeavesConfig { +@@ -388,6 +388,21 @@ public final class LeavesConfig { simplerVanillaShapelessRecipes = getBoolean("settings.performance.simpler-vanilla-shapeless-recipes", simplerVanillaShapelessRecipes); } diff --git a/patches/server/0046-BBOR-Protocol.patch b/patches/server/0046-BBOR-Protocol.patch index 6203ce45..d07b7724 100644 --- a/patches/server/0046-BBOR-Protocol.patch +++ b/patches/server/0046-BBOR-Protocol.patch @@ -95,10 +95,10 @@ index 8e9fb3731edc302ae472599f8e2d953d485a265e..0f639571f63adad7d2a738b7ce8dc015 // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 29acea996719de0e1333e51df310678a7025267a..9f7b9a56f2c55dca3c434fb858c37c061de7c279 100644 +index a72995e1315fe492f4c2299a5d67b077ed094509..b770012135ed4e2423bdb7f44d06eedd077171ce 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -401,6 +401,11 @@ public final class LeavesConfig { +@@ -403,6 +403,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0047-InstantBlockUpdater-Reintroduced.patch b/patches/server/0047-InstantBlockUpdater-Reintroduced.patch index 612d709a..9b9fa8fe 100644 --- a/patches/server/0047-InstantBlockUpdater-Reintroduced.patch +++ b/patches/server/0047-InstantBlockUpdater-Reintroduced.patch @@ -6,7 +6,7 @@ Subject: [PATCH] InstantBlockUpdater Reintroduced This patch is Powered by Carpet-TIS-Addition(https://github.com/plusls/Carpet-TIS-Addition) diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index dda31b5eea92ce3de9de0e4054ee9c7f6df631e4..dd3868045923eed8c6eaf87a57d9bf7dcd466433 100644 +index f22d1a2a8a1dbb1b2294dfcaddcac24b10d905ae..3ea22e4ccde356ba953d679513e8138b631937e5 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -72,6 +72,7 @@ import net.minecraft.world.level.lighting.LevelLightEngine; @@ -33,10 +33,10 @@ index dda31b5eea92ce3de9de0e4054ee9c7f6df631e4..dd3868045923eed8c6eaf87a57d9bf7d this.getWorldBorder().world = (ServerLevel) this; // From PlayerList.setPlayerFileData diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 40d3fe005b8bde69753807bc0fdd0255fd705a62..4123f65395a595e423946c97437247f267d49ce3 100644 +index b770012135ed4e2423bdb7f44d06eedd077171ce..a06ea69adcfba10b4f5deb0dfd1798974a862eed 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -406,6 +406,15 @@ public final class LeavesConfig { +@@ -408,6 +408,15 @@ public final class LeavesConfig { bborProtocol = getBoolean("settings.protocol.bbor-protocol", bborProtocol); } diff --git a/patches/server/0048-Random-flatten-triangular-distribution.patch b/patches/server/0048-Random-flatten-triangular-distribution.patch index 31600594..d12711f7 100644 --- a/patches/server/0048-Random-flatten-triangular-distribution.patch +++ b/patches/server/0048-Random-flatten-triangular-distribution.patch @@ -26,10 +26,10 @@ index ff1ad1024419182f7f3de578442c1c033d4c9ebb..d93f3eeea17d58ccc01c6010b2d49f81 default void consumeCount(int count) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 4123f65395a595e423946c97437247f267d49ce3..6feda82b282b73aab1955f2c5189cda9274d5213 100644 +index a06ea69adcfba10b4f5deb0dfd1798974a862eed..383264142a2b138424fd22a65fb58fb480e721f3 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -415,6 +415,11 @@ public final class LeavesConfig { +@@ -417,6 +417,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0049-Jade-Protocol.patch b/patches/server/0049-Jade-Protocol.patch index 5a83f6b1..c6e3e17e 100644 --- a/patches/server/0049-Jade-Protocol.patch +++ b/patches/server/0049-Jade-Protocol.patch @@ -69,10 +69,10 @@ index 0f639571f63adad7d2a738b7ce8dc0158cdeb0c6..9db4ac8fb3e00e6b37d55c5c6bac9557 // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index af3da4fa3073123416cc5ef37ca4db8b102b26eb..51baa0305dda36fec8855021b56867c2c863ba79 100644 +index 383264142a2b138424fd22a65fb58fb480e721f3..35aab7f3d0d67fdbee2f438070b2a88ecd269083 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -420,6 +420,11 @@ public final class LeavesConfig { +@@ -422,6 +422,11 @@ public final class LeavesConfig { flattenTriangularDistribution = getBoolean("settings.modify.flatten-triangular-distribution", flattenTriangularDistribution); } diff --git a/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch b/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch index cd1c1095..7e0c8642 100644 --- a/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch +++ b/patches/server/0050-Carpet-alternative-block-placement-Protocol.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Carpet alternative block placement Protocol This patch is Powered by carpet-extra(https://github.com/gnembon/carpet-extra) diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 94a9af6f7b01677609a372371c77f11e462c7e6e..39fb3db045173d0e6779236282836be9ccf62aac 100644 +index 53279da009fb9f203d7e8006cb1ef14d9ef8c017..27dc44ebb12c8f321587d6d988c41bea4e9519ab 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1948,7 +1948,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -78,10 +78,10 @@ index 7b71073027f4cf79736546500ededdfbb83d968e..085097d454869e46adafd1cff5908e39 public BlockState getStateForPlacement(BlockPlaceContext ctx) { return this.defaultBlockState(); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 761846061ffe05103a62d0c22561d492a6af8780..2256eaafd3f8acf420906744399d974e7e470939 100644 +index 35aab7f3d0d67fdbee2f438070b2a88ecd269083..60f21d16cd1bdac17bd8f29398edab7024b369f2 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -425,6 +425,15 @@ public final class LeavesConfig { +@@ -427,6 +427,15 @@ public final class LeavesConfig { jadeProtocol = getBoolean("settings.protocol.jade-protocol", jadeProtocol); } diff --git a/patches/server/0051-Player-operation-limiter.patch b/patches/server/0051-Player-operation-limiter.patch index 75b7e6ec..43f714d6 100644 --- a/patches/server/0051-Player-operation-limiter.patch +++ b/patches/server/0051-Player-operation-limiter.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Player operation limiter This patch is Powered by plusls-carpet-addition(https://github.com/plusls/plusls-carpet-addition) diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 5cc41baf24eed6a186620fe3bcd76410ffc11d26..b1d5e07d68a8203450a6b4c28ec863cb90017586 100644 +index 2e5871d9af67ad1c65a382f5e4964a13a7821305..128a79504e2459826dbc32b5889f66bf00ea4189 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -269,6 +269,10 @@ public class ServerPlayer extends Player { @@ -132,10 +132,10 @@ index 3ab714721b51b039291b8e8a4b4da5118e18f5b7..1ee9c431282851882cdc337ea01ee590 return InteractionResult.FAIL; } else if (!this.placeBlock(blockactioncontext1, iblockdata)) { diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 2256eaafd3f8acf420906744399d974e7e470939..932e8db3d683de1f58439a2496aff37987dfce9a 100644 +index 60f21d16cd1bdac17bd8f29398edab7024b369f2..929fff5e31c0d13da63991e2e532e346ab7eab46 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -434,6 +434,11 @@ public final class LeavesConfig { +@@ -436,6 +436,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0052-Renewable-Elytra.patch b/patches/server/0052-Renewable-Elytra.patch index 9c746c17..7b72f4b6 100644 --- a/patches/server/0052-Renewable-Elytra.patch +++ b/patches/server/0052-Renewable-Elytra.patch @@ -40,10 +40,10 @@ index aa8734856ec7b90036afad13bfda46c02e548812..5d3c60c2e216848c7bbaebbd9b4f8184 java.util.UUID spawningEntity; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 932e8db3d683de1f58439a2496aff37987dfce9a..c303ccacacb885d952268bfee069e5e807fe52ba 100644 +index 929fff5e31c0d13da63991e2e532e346ab7eab46..214ba777f1f6a9e81a4bdd772b4412796e1bbbfc 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -439,6 +439,11 @@ public final class LeavesConfig { +@@ -441,6 +441,11 @@ public final class LeavesConfig { playerOperationLimiter = getBoolean("settings.modify.player-operation-limiter", playerOperationLimiter); } diff --git a/patches/server/0053-Stackable-ShulkerBoxes.patch b/patches/server/0053-Stackable-ShulkerBoxes.patch index eaf20705..180c1150 100644 --- a/patches/server/0053-Stackable-ShulkerBoxes.patch +++ b/patches/server/0053-Stackable-ShulkerBoxes.patch @@ -132,7 +132,7 @@ index cf89cbffabf8b88265b5ffbc42b55fe617a32c82..1a9dc4afaf7dbcaf8cc46f8bdf4fa1cf if (this.add(i, stack.split(j)) && notifiesClient && this.player instanceof ServerPlayer) { ((ServerPlayer) this.player).connection.send(new ClientboundContainerSetSlotPacket(-2, 0, i, this.getItem(i))); diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60ea923849f 100644 +index 4226e20dc91087f31c44e0ea7d0e8d06ec6facc8..b84367de01803ea9d2ac043c31d74ce13994e9d7 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -30,8 +30,10 @@ import net.minecraft.world.entity.SlotAccess; @@ -146,7 +146,7 @@ index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60e import net.minecraft.world.level.block.entity.BlockEntity; import org.slf4j.Logger; -@@ -451,7 +453,7 @@ public abstract class AbstractContainerMenu { +@@ -453,7 +455,7 @@ public abstract class AbstractContainerMenu { int j1 = slot1.hasItem() ? slot1.getItem().getCount() : 0; AbstractContainerMenu.getQuickCraftSlotCount(this.quickcraftSlots, this.quickcraftType, itemstack3, j1); @@ -155,7 +155,7 @@ index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60e if (itemstack3.getCount() > k1) { itemstack3.setCount(k1); -@@ -573,7 +575,7 @@ public abstract class AbstractContainerMenu { +@@ -575,7 +577,7 @@ public abstract class AbstractContainerMenu { slot.set(itemstack4); } } else if (ItemStack.isSameItemSameTags(itemstack, itemstack4)) { @@ -164,7 +164,7 @@ index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60e optional1.ifPresent((itemstack5) -> { itemstack4.grow(itemstack5.getCount()); -@@ -639,7 +641,7 @@ public abstract class AbstractContainerMenu { +@@ -641,7 +643,7 @@ public abstract class AbstractContainerMenu { slot2 = (Slot) this.slots.get(slotIndex); if (slot2.hasItem()) { itemstack1 = slot2.getItem().copy(); @@ -173,7 +173,7 @@ index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60e this.setCarried(itemstack1); } } else if (actionType == ClickType.THROW && this.getCarried().isEmpty() && slotIndex >= 0) { -@@ -655,14 +657,14 @@ public abstract class AbstractContainerMenu { +@@ -657,14 +659,14 @@ public abstract class AbstractContainerMenu { i2 = button == 0 ? 1 : -1; for (l1 = 0; l1 < 2; ++l1) { @@ -191,7 +191,7 @@ index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60e itemstack1.grow(itemstack6.getCount()); } -@@ -782,7 +784,7 @@ public abstract class AbstractContainerMenu { +@@ -801,7 +803,7 @@ public abstract class AbstractContainerMenu { Slot slot; ItemStack itemstack1; @@ -200,7 +200,7 @@ index 143977055717c2fe27df76231da304e2863b8f1f..a4e1e37660ae9e676a663e0fb4dff60e while (!stack.isEmpty()) { if (fromLast) { if (k < startIndex) { -@@ -802,16 +804,18 @@ public abstract class AbstractContainerMenu { +@@ -821,16 +823,18 @@ public abstract class AbstractContainerMenu { if (!itemstack1.isEmpty() && ItemStack.isSameItemSameTags(stack, itemstack1)) { int l = itemstack1.getCount() + stack.getCount(); @@ -278,7 +278,7 @@ index 47468086c1cae252aa99c55b0065f225357dee62..bca757ea05403fe46f5bf0dfa75561b8 public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) { return SHAPE; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index c303ccacacb885d952268bfee069e5e807fe52ba..1fbfc21a8911e17dfc3b68c963be954552eb27f1 100644 +index 214ba777f1f6a9e81a4bdd772b4412796e1bbbfc..5736bdc4bf1a6d925ca132fbb3e31d4ded9b42ab 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -9,6 +9,7 @@ import org.bukkit.configuration.ConfigurationSection; @@ -289,7 +289,7 @@ index c303ccacacb885d952268bfee069e5e807fe52ba..1fbfc21a8911e17dfc3b68c963be9545 import java.io.File; import java.lang.reflect.InvocationTargetException; -@@ -444,6 +445,14 @@ public final class LeavesConfig { +@@ -446,6 +447,14 @@ public final class LeavesConfig { renewableElytra = getDouble("settings.modify.renewable-elytra", renewableElytra); } diff --git a/patches/server/0054-Improve-fluid-direction-caching.patch b/patches/server/0054-Improve-fluid-direction-caching.patch index 0008f2f0..21dacca8 100644 --- a/patches/server/0054-Improve-fluid-direction-caching.patch +++ b/patches/server/0054-Improve-fluid-direction-caching.patch @@ -117,10 +117,10 @@ index 0ffc131baf5c0edc4f2ca0f466fcdb20be4a47b8..4cd00673e887183f49075e5d3ba904de public abstract Fluid getFlowing(); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 1fbfc21a8911e17dfc3b68c963be954552eb27f1..33d878d36f2877d1badab1ee3a327674793ef40c 100644 +index 5736bdc4bf1a6d925ca132fbb3e31d4ded9b42ab..25d2e6d0d703fdcb2f4f9b1d795b684b7170bdaa 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -453,6 +453,15 @@ public final class LeavesConfig { +@@ -455,6 +455,15 @@ public final class LeavesConfig { shulkerBoxStackSize = Integer.parseInt(stackableShulkerBoxes); } diff --git a/patches/server/0055-MC-Technical-Survival-Mode.patch b/patches/server/0055-MC-Technical-Survival-Mode.patch index f33d5859..50c2dcff 100644 --- a/patches/server/0055-MC-Technical-Survival-Mode.patch +++ b/patches/server/0055-MC-Technical-Survival-Mode.patch @@ -70,7 +70,7 @@ index 612d536f8a1b4e45d7431dc8bbd1c7aa631a3575..9e021b4b25df941b4af1fb984ad123a3 entity.spawnReason == org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { continue; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 33d878d36f2877d1badab1ee3a327674793ef40c..9ed9b6925dffb57839a70d6ed89a1f1fc49a186a 100644 +index 25d2e6d0d703fdcb2f4f9b1d795b684b7170bdaa..1c8f60066aa39ba673d8fdd5de2ccc3cd1e941ec 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -2,11 +2,13 @@ package top.leavesmc.leaves; @@ -87,7 +87,7 @@ index 33d878d36f2877d1badab1ee3a327674793ef40c..9ed9b6925dffb57839a70d6ed89a1f1f import top.leavesmc.leaves.bot.BotCommand; import top.leavesmc.leaves.bot.agent.Actions; import top.leavesmc.leaves.util.MathUtils; -@@ -462,6 +464,24 @@ public final class LeavesConfig { +@@ -464,6 +466,24 @@ public final class LeavesConfig { } } diff --git a/patches/server/0056-Return-nether-portal-fix.patch b/patches/server/0056-Return-nether-portal-fix.patch index cbaf0e1f..42eb33ae 100644 --- a/patches/server/0056-Return-nether-portal-fix.patch +++ b/patches/server/0056-Return-nether-portal-fix.patch @@ -133,10 +133,10 @@ index 7647b8bb3117d005dd616b29e7310f8328973b7f..eaeac639924098b86da57e2a87efc2af @Nullable private DamageSource lastDamageSource; diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 054f6479dff7e4bcef2e2f3d47e65c009d5ec5b9..478e906cc24a83ded6fbc78bcb7efae30a99b525 100644 +index 1c8f60066aa39ba673d8fdd5de2ccc3cd1e941ec..2bd740599aac161878d7e0747d49541e821d57a2 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -482,6 +482,11 @@ public final class LeavesConfig { +@@ -484,6 +484,11 @@ public final class LeavesConfig { } } diff --git a/patches/server/0057-Appleskin-Protocol.patch b/patches/server/0057-Appleskin-Protocol.patch index a0465e19..e26b3bba 100644 --- a/patches/server/0057-Appleskin-Protocol.patch +++ b/patches/server/0057-Appleskin-Protocol.patch @@ -55,10 +55,10 @@ index 9db4ac8fb3e00e6b37d55c5c6bac9557bae105ab..15a28ec04c79149dc738023b9d560adb // world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean)) diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 478e906cc24a83ded6fbc78bcb7efae30a99b525..25a711517d4ffdc9384c1160af1b4e9635b85f49 100644 +index 2bd740599aac161878d7e0747d49541e821d57a2..4df37e02bdc46a98fffa459b7ee0b73fad4cbade 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -487,6 +487,11 @@ public final class LeavesConfig { +@@ -489,6 +489,11 @@ public final class LeavesConfig { netherPortalFix = getBoolean("settings.modify.return-nether-portal-fix", netherPortalFix); } diff --git a/patches/server/0058-Xaero-Map-Protocol.patch b/patches/server/0058-Xaero-Map-Protocol.patch index 23ab6241..03773e12 100644 --- a/patches/server/0058-Xaero-Map-Protocol.patch +++ b/patches/server/0058-Xaero-Map-Protocol.patch @@ -17,7 +17,7 @@ index 9f48801f3dbd33816f6771be8d444e7ca748aaad..be05f7f218475a3eaa69d2bea1efb2ab // CraftBukkit start - handle player weather // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F)); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 25a711517d4ffdc9384c1160af1b4e9635b85f49..2808792b8fa1ed3b7f2c6f9b81e804a7bc1a6f59 100644 +index 4df37e02bdc46a98fffa459b7ee0b73fad4cbade..93084793e1598d8d08c7f23819bfc90f2585f308 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -20,6 +20,7 @@ import java.lang.reflect.Modifier; @@ -28,7 +28,7 @@ index 25a711517d4ffdc9384c1160af1b4e9635b85f49..2808792b8fa1ed3b7f2c6f9b81e804a7 import java.util.logging.Level; // Powered by Tuinity(https://github.com/Tuinity/Tuinity) -@@ -492,6 +493,13 @@ public final class LeavesConfig { +@@ -494,6 +495,13 @@ public final class LeavesConfig { appleskinProtocol = getBoolean("settings.protocol.appleskin-protocol", appleskinProtocol); } diff --git a/patches/server/0059-Leaves-Extra-Yggdrasil-Service.patch b/patches/server/0059-Leaves-Extra-Yggdrasil-Service.patch index 7339231c..22b3d109 100644 --- a/patches/server/0059-Leaves-Extra-Yggdrasil-Service.patch +++ b/patches/server/0059-Leaves-Extra-Yggdrasil-Service.patch @@ -31,7 +31,7 @@ index 781b72fd88149642c9fceaecfbfe7546273fb749..d175bccec9ca560592072b21414df4ae String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName); LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath()); diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 2808792b8fa1ed3b7f2c6f9b81e804a7bc1a6f59..fc4e3e0d2ec19463afceb45edcebb8beda408c3d 100644 +index 93084793e1598d8d08c7f23819bfc90f2585f308..a8fc7f2acd879ce33684bb14c60202aa15d6a77c 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java @@ -11,6 +11,7 @@ import org.bukkit.configuration.file.YamlConfiguration; @@ -42,7 +42,7 @@ index 2808792b8fa1ed3b7f2c6f9b81e804a7bc1a6f59..fc4e3e0d2ec19463afceb45edcebb8be import top.leavesmc.leaves.util.MathUtils; import java.io.File; -@@ -500,6 +501,18 @@ public final class LeavesConfig { +@@ -502,6 +503,18 @@ public final class LeavesConfig { xaeroMapServerID = getInt("settings.protocol.xaero-map-server-id", xaeroMapServerID); } diff --git a/patches/server/0060-Use-vanilla-random-config.patch b/patches/server/0060-Use-vanilla-random-config.patch index af3e5462..c0192afe 100644 --- a/patches/server/0060-Use-vanilla-random-config.patch +++ b/patches/server/0060-Use-vanilla-random-config.patch @@ -31,10 +31,10 @@ index a51424d29ac353cf1bec4d1484db0acb63bebba5..3172c2f10d5018427022f3bb479038db } diff --git a/src/main/java/top/leavesmc/leaves/LeavesConfig.java b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -index 03ccb227cbc2077eb34185c41eae976a0885621b..2c44dff0db0b0824e983739510810e10f78910c7 100644 +index a8fc7f2acd879ce33684bb14c60202aa15d6a77c..2c75585014ffecf3d07d5a9a507e4d7d55b7bf6c 100644 --- a/src/main/java/top/leavesmc/leaves/LeavesConfig.java +++ b/src/main/java/top/leavesmc/leaves/LeavesConfig.java -@@ -513,6 +513,15 @@ public final class LeavesConfig { +@@ -515,6 +515,15 @@ public final class LeavesConfig { } }