From 6f9e4abcbf019298762c9d46173081e9f659557d Mon Sep 17 00:00:00 2001 From: Helvetica Volubi Date: Sat, 28 Jun 2025 00:41:56 +0800 Subject: [PATCH] Start 1.21.6 --- .../{build_1.21.5.yml => build_1.21.6.yml} | 6 +- docs/CONTRIBUTING.md | 12 ++-- docs/CONTRIBUTING_EN.md | 12 ++-- gradle.properties | 6 +- lophine-server/build.gradle.kts.patch | 6 +- .../features/0001-Rebrand-to-Lophine.patch | 12 ++-- ...-for-command-block-command-execution.patch | 4 +- ...04-Add-config-to-enable-tick-command.patch | 10 ++-- ...05-Add-config-to-revert-raid-changes.patch | 8 +-- ...-to-enable-Cross-Region-Damage-trace.patch | 20 +++---- ...-config-to-enable-Raytracing-tracker.patch | 26 ++++---- ...urpur-Barrels-and-enderchests-6-rows.patch | 12 ++-- .../0009-Stackable-ShulkerBoxes.patch | 60 +++++++++---------- .../features/0010-Better-ShulkerBox.patch | 24 ++++---- .../0011-Spawn-invulnerable-time.patch | 8 +-- .../0012-Old-nether-portal-collision.patch | 20 ------- ...ch => 0012-Old-zombie-reinforcement.patch} | 4 +- ...> 0013-Old-replaceable-by-mushrooms.patch} | 4 +- ...-support.patch => 0014-I18n-support.patch} | 4 +- .../features/0001-Rebrand-to-Lophine.patch | 6 +- .../config/modules/misc/OldFeatureConfig.java | 3 - .../config/modules/removed/RemovedConfig.java | 2 +- .../fun/bm/lophine/utils/ServerI18nUtil.java | 2 +- 23 files changed, 126 insertions(+), 145 deletions(-) rename .github/workflows/{build_1.21.5.yml => build_1.21.6.yml} (96%) delete mode 100644 lophine-server/minecraft-patches/features/0012-Old-nether-portal-collision.patch rename lophine-server/minecraft-patches/features/{0013-Old-zombie-reinforcement.patch => 0012-Old-zombie-reinforcement.patch} (86%) rename lophine-server/minecraft-patches/features/{0014-Old-replaceable-by-mushrooms.patch => 0013-Old-replaceable-by-mushrooms.patch} (94%) rename lophine-server/minecraft-patches/features/{0015-I18n-support.patch => 0014-I18n-support.patch} (88%) diff --git a/.github/workflows/build_1.21.5.yml b/.github/workflows/build_1.21.6.yml similarity index 96% rename from .github/workflows/build_1.21.5.yml rename to .github/workflows/build_1.21.6.yml index a3d5450..9d65b19 100644 --- a/.github/workflows/build_1.21.5.yml +++ b/.github/workflows/build_1.21.6.yml @@ -1,10 +1,10 @@ -name: Lophine CI - ver/1.21.5 +name: Lophine CI - ver/1.21.6 on: push: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] pull_request: - branches: [ "ver/1.21.5" ] + branches: [ "ver/1.21.6" ] permissions: write-all diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 9297713..c67797b 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -41,19 +41,21 @@ Lophine 使用和 Folia 一样的补丁系统,并为了针对不同部分的 1. 将你的仓库 clone 到本地; 2. 在你的 IDE 或 终端 内执行 Gradle 的 `applyAllPatches` 任务,如果是在终端内,你可以执行 `./gradlew applyAllPatches`; -3. 在执行操作后,仓库根目录下应该存在以下目录对: `lophine-api` 和 `lophine-server` , `folia-api` 和 `folia-server` , 以及 `paper-api` 和 `paper-server`(下文称作 `*-api` 和 `*-server` ); +3. 在执行操作后,仓库根目录下应该存在以下目录对: `lophine-api` 和 `lophine-server` , `luminol-api` 和 `luminol-server` , `folia-api` 和 `folia-server` , 以及 `paper-api` 和 `paper-server`(下文称作 `*-api` 和 `*-server` ); 4. 进入 仓库根目录下的 `*-api` 和 `*-server` 文件夹进行修改。 以下为对上述各个文件夹的简单描述,详细描述可以参考[这里](https://github.com/Toffikk/paperweight-examples/blob/18241979c88068d5b061d95ad69c98ecb201c246/README.md): 1. API部分 - - `lophine-api` :暂无有效文件 + - `lophine-api` :对新增API的修改 + - `luminol-api` :对luminol-API的修改应当在此文件夹下进行 - `folia-api` :对folia-API的修改应当在此文件夹下进行 - `paper-api` :对paper-API/spigot-API/bukkit-API的修改应该在此文件夹下进行 2. Server部分 - - `lophine-server` :对Minecraft原版服务器的修改应当在此文件夹下进行 - - `folia-server` :暂无有效文件 - - `paper-server` :对于非原版的对服务器逻辑的修改应当在此文件夹下进行 + - `lophine-server` :对Minecraft原版服务器的修改和新增文件应当在此文件夹下进行 + - `luminol-server` :对luminol-server的修改应当在此文件夹下进行 + - `folia-server` :对folia-Server的修改应当在此文件夹下进行 + - `paper-server` :对于paper对服务器逻辑的修改应当在此文件夹下进行 顺便一提,仓库根目录下的 `*-api` 和 `*-server` 并不是正常的 git 仓库: diff --git a/docs/CONTRIBUTING_EN.md b/docs/CONTRIBUTING_EN.md index f2af417..a0fea10 100644 --- a/docs/CONTRIBUTING_EN.md +++ b/docs/CONTRIBUTING_EN.md @@ -44,20 +44,22 @@ If you have forked the main repository, then you should follow the steps below: 1. Clone your repository to local 2. Run Gradle's `applyAllPatches` task in your IDE or terminal (You can run `./gradlew applyAllPatches` directly in terminal.) -3. After performing the operation, the following directory pairs should exist in the root directory of the warehouse: `lophine-api` and `lophine-server` , `folia-api` and `folia-server` , `paper-api` and `paper-server` (Referred to `*-api` and `*-server` as below) +3. After performing the operation, the following directory pairs should exist in the root directory of the warehouse: `lophine-api` and `lophine-server` , `luminol-api` and `luminol-server` , `folia-api` and `folia-server` , `paper-api` and `paper-server` (Referred to `*-api` and `*-server` as below) 4. Enter `*-api` and `*-server` directory to carry out modifications. The following is the simple description of the aforementioned folders, detailed description can be referred to [here](https://github.com/Toffikk/paperweight-examples/blob/18241979c88068d5b061d95ad69c98ecb201c246/README.md): 1. API part - - `lophine-api` : There is no valid file + - `lophine-api` : Modifications to the new API + - `luminol-api` : Modifications to Luminol API should be carried out in this folder - `folia-api` : Modifications to Folia API should be carried out in this folder - `paper-api` : Modifications to Paper API/Spigot API/Bukkit API should be carried out in this folder 2. Server part - - `lophine-server` : Modifications to Minecraft Vanilla Server's source logic should be carried out in this folder - - `folia-server` : There is no valid file - - `paper-server` : Modifications to non-vanilla server logic should be carried out in this folder + - `lophine-server` : Changes and new files to the Minecraft vanilla server should be made in this folder + - `luminol-server` : Changes to luminol-server should be made in this folder + - `folia-server` : Changes to folia-server should be made in this folder + - `paper-server` : Modifications to the server logic for paper should be made in this folder BTW, `*-api` and `*-server` and are not normal git repositories. diff --git a/gradle.properties b/gradle.properties index ed8f621..bc821b9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ group=fun.bm.lophine -version=1.21.5-R0.1-SNAPSHOT -mcVersion=1.21.5 +version=1.21.6-R0.1-SNAPSHOT +mcVersion=1.21.6 -luminolRef=3eedf8615328bd7738d01e04694aacfa9601b17d +luminolRef=9ff4bda08c2b7825b56d915a7e7395b9089f658f org.gradle.configuration-cache=true org.gradle.caching=true diff --git a/lophine-server/build.gradle.kts.patch b/lophine-server/build.gradle.kts.patch index be98ca5..9261124 100644 --- a/lophine-server/build.gradle.kts.patch +++ b/lophine-server/build.gradle.kts.patch @@ -1,6 +1,6 @@ --- a/luminol-server/build.gradle.kts +++ b/luminol-server/build.gradle.kts -@@ -54,7 +_,23 @@ +@@ -52,7 +_,23 @@ } } @@ -23,8 +23,8 @@ + + activeFork = lophine + spigot { - buildDataRef = "702e1a0a5072b2c4082371d5228cb30525687efc" @@ -142,12 +_,16 @@ resources { srcDir("../paper-server/src/main/resources") } java { srcDir("../folia-server/src/main/java") } @@ -51,7 +51,7 @@ implementation("com.electronwill.night-config:toml:3.8.2") // Luminol - Night config // Abomination start implementation("com.github.luben:zstd-jni:1.5.4-1") -@@ -265,14 +_,14 @@ +@@ -264,14 +_,14 @@ val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim() attributes( "Main-Class" to "org.bukkit.craftbukkit.Main", diff --git a/lophine-server/minecraft-patches/features/0001-Rebrand-to-Lophine.patch b/lophine-server/minecraft-patches/features/0001-Rebrand-to-Lophine.patch index 40cda06..c1badf7 100644 --- a/lophine-server/minecraft-patches/features/0001-Rebrand-to-Lophine.patch +++ b/lophine-server/minecraft-patches/features/0001-Rebrand-to-Lophine.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Rebrand to Lophine diff --git a/net/minecraft/server/Main.java b/net/minecraft/server/Main.java -index fcf599846a38beeb8f094d5376c01d5a690f7a2f..48ef71f32b9aa385a8caecafcc8442f932ef8470 100644 +index a75a5ce8477da8d3f7b0ae41bfbd75defe1d2ed4..ad80d198d96bb05d71200958216c4223bde7bb97 100644 --- a/net/minecraft/server/Main.java +++ b/net/minecraft/server/Main.java -@@ -108,7 +108,7 @@ public class Main { +@@ -109,7 +109,7 @@ public class Main { JvmProfiler.INSTANCE.start(Environment.SERVER); } @@ -18,16 +18,16 @@ index fcf599846a38beeb8f094d5376c01d5a690f7a2f..48ef71f32b9aa385a8caecafcc8442f9 Bootstrap.bootStrap(); Bootstrap.validate(); diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 5290b9cb524160717fb40704fb10fc0d0a37941b..1b60378cdbf5bc88f996010a61cceec7c2b9e2dc 100644 +index 1f3c26cc9f3b687693c36f2946394fad5ab6bc9f..45cd92cd69bcb66b94bc6278f2897ea4a31c45b6 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -171,8 +171,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface this.paperConfigurations.initializeGlobalConfiguration(this.registryAccess()); this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Paper end - initialize global and world-defaults configuration -- me.earthme.luminol.config.LuminolConfig.finalizeLoadConfig(); //Luminol - load config file -- me.earthme.luminol.config.LuminolConfig.setupLatch(); //Luminol - load config file -+ fun.bm.lophine.config.LophineConfig.loadConfigFiles(); //Luminol - load config file // Lophine - load config file +- me.earthme.luminol.config.LuminolConfig.finalizeLoadConfig(); // Luminol - load config file +- me.earthme.luminol.config.LuminolConfig.setupLatch(); // Luminol - load config file ++ fun.bm.lophine.config.LophineConfig.loadConfigFiles(); // Lophine - load config file if (false) this.server.spark.enableEarlyIfRequested(); // Paper - spark // Luminol - Force disable builtin spark // Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save if (this.convertOldUsers()) { diff --git a/lophine-server/minecraft-patches/features/0002-Add-config-for-command-block-command-execution.patch b/lophine-server/minecraft-patches/features/0002-Add-config-for-command-block-command-execution.patch index 6fbeddb..a801c0c 100644 --- a/lophine-server/minecraft-patches/features/0002-Add-config-for-command-block-command-execution.patch +++ b/lophine-server/minecraft-patches/features/0002-Add-config-for-command-block-command-execution.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config for command block command execution diff --git a/net/minecraft/world/level/BaseCommandBlock.java b/net/minecraft/world/level/BaseCommandBlock.java -index 91e30f9c83259abc0589f4ee69c429cd4305d6ea..e1cc5576017358849e7c536accd14d2e6eb5c706 100644 +index 8b8ce26de104211728d4b64e641a2b471ce89073..fde808499f047128010fd3f94ba086dfab44299a 100644 --- a/net/minecraft/world/level/BaseCommandBlock.java +++ b/net/minecraft/world/level/BaseCommandBlock.java -@@ -102,7 +102,7 @@ public abstract class BaseCommandBlock implements CommandSource { +@@ -96,7 +96,7 @@ public abstract class BaseCommandBlock implements CommandSource { } public boolean performCommand(Level level) { diff --git a/lophine-server/minecraft-patches/features/0004-Add-config-to-enable-tick-command.patch b/lophine-server/minecraft-patches/features/0004-Add-config-to-enable-tick-command.patch index d799cca..7125868 100644 --- a/lophine-server/minecraft-patches/features/0004-Add-config-to-enable-tick-command.patch +++ b/lophine-server/minecraft-patches/features/0004-Add-config-to-enable-tick-command.patch @@ -97,10 +97,10 @@ index 0357792de0ed8ec9058d1847c8b45c33ff365af6..4945c11f573a53df2f5be4beb7af6a3f this.scheduler.regionFailed(this, false, thr); // regionFailed will schedule a shutdown, so we should avoid letting this region tick further diff --git a/net/minecraft/commands/Commands.java b/net/minecraft/commands/Commands.java -index ea50e3c0c4044f03dc8257680814f808fbf3a177..63154426854c507738d646490ac76f531145fab2 100644 +index 14719cca5ff91c8647b3b616b2dfd4d153946d92..4a872ce3a3815d42da124a20af1bf232c9b47e12 100644 --- a/net/minecraft/commands/Commands.java +++ b/net/minecraft/commands/Commands.java -@@ -214,7 +214,11 @@ public class Commands { +@@ -243,7 +243,11 @@ public class Commands { TeleportCommand.register(this.dispatcher); TellRawCommand.register(this.dispatcher, context); //TestCommand.register(this.dispatcher, context); // Folia - region threading @@ -114,10 +114,10 @@ index ea50e3c0c4044f03dc8257680814f808fbf3a177..63154426854c507738d646490ac76f53 TitleCommand.register(this.dispatcher, context); //TriggerCommand.register(this.dispatcher); // Folia - region threading - TODO later diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java -index 33d596c0f07d076886c0dd8eb93e901cdb56e438..87625b365e04ce05fa2b6cdf2003c839255c4393 100644 +index 737df5c9345e22fa4487cbb83c7462b92a4f9e78..9f868e8865a1360b27cc8ac990f3a07d893af722 100644 --- a/net/minecraft/server/MinecraftServer.java +++ b/net/minecraft/server/MinecraftServer.java -@@ -266,7 +266,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 20 * 10 && this.isAlive(); } // KioCG @@ -78,10 +78,10 @@ index a023cc399fc8bfee7771e5ca6716578f89b7072f..88ce4001a2fa764a4dc41ca0132ad067 + } diff --git a/net/minecraft/world/entity/EntityType.java b/net/minecraft/world/entity/EntityType.java -index 6b72ab233508e6df1eca34360ce76d102ee25a41..f39ee4605cc15102d6560afd1dad5f56dd53cf4e 100644 +index 6f00ffa05d9597917574357e0069c9b056aa5ce2..5cc7a91e32f17d8d9585ae4844a4ed3b706e3273 100644 --- a/net/minecraft/world/entity/EntityType.java +++ b/net/minecraft/world/entity/EntityType.java -@@ -1109,6 +1109,9 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -1119,6 +1119,9 @@ public class EntityType implements FeatureElement, EntityTypeT public final int passengerTickTimerId; public final int passengerInactiveTickTimerId; // Folia end - profiler @@ -92,10 +92,10 @@ index 6b72ab233508e6df1eca34360ce76d102ee25a41..f39ee4605cc15102d6560afd1dad5f56 public EntityType( EntityType.EntityFactory factory, diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 543750bee43bfaaaf33f2cec53eb0de05e7a1dd2..a26ec6f1a1553bf0b415f382177c75f481e21180 100644 +index 47f62fbe97c559c25ad2bc67c18f2025c78e2c69..0a114ac527026473c86f11dab564ac3c31c41f39 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -220,6 +220,25 @@ public abstract class Player extends LivingEntity { +@@ -229,6 +229,25 @@ public abstract class Player extends LivingEntity { return (org.bukkit.craftbukkit.entity.CraftHumanEntity) super.getBukkitEntity(); } // CraftBukkit end @@ -119,9 +119,9 @@ index 543750bee43bfaaaf33f2cec53eb0de05e7a1dd2..a26ec6f1a1553bf0b415f382177c75f4 + } + // Luminol end - public Player(Level level, BlockPos pos, float yRot, GameProfile gameProfile) { + public Player(Level level, GameProfile gameProfile) { super(EntityType.PLAYER, level); -@@ -277,6 +296,26 @@ public abstract class Player extends LivingEntity { +@@ -287,6 +306,26 @@ public abstract class Player extends LivingEntity { @Override public void tick() { @@ -148,7 +148,7 @@ index 543750bee43bfaaaf33f2cec53eb0de05e7a1dd2..a26ec6f1a1553bf0b415f382177c75f4 this.noPhysics = this.isSpectator(); if (this.isSpectator() || this.isPassenger()) { this.setOnGround(false); -@@ -1415,6 +1454,7 @@ public abstract class Player extends LivingEntity { +@@ -1427,6 +1466,7 @@ public abstract class Player extends LivingEntity { if (this.containerMenu != null && this.hasContainerOpen()) { this.doCloseContainer(); } diff --git a/lophine-server/minecraft-patches/features/0008-Purpur-Barrels-and-enderchests-6-rows.patch b/lophine-server/minecraft-patches/features/0008-Purpur-Barrels-and-enderchests-6-rows.patch index 3b3f734..3ba8c96 100644 --- a/lophine-server/minecraft-patches/features/0008-Purpur-Barrels-and-enderchests-6-rows.patch +++ b/lophine-server/minecraft-patches/features/0008-Purpur-Barrels-and-enderchests-6-rows.patch @@ -8,10 +8,10 @@ As part of: Purpur (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18 Licensed under: MIT (https://github.com/PurpurMC/Purpur/blob/09f547de09fc5d886f18f6d99ff389289766ec9d/LICENSE) diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java -index 001483b7098523f3645a95c81fcf0e38b551705e..70be6c3ef009f1746353cc330a188bc693174ed7 100644 +index b8bd7410e3d5cd8f81f41b52a3a8732134829478..7f155ab485a5157d810585074b5b9de4be6bfa4e 100644 --- a/net/minecraft/server/players/PlayerList.java +++ b/net/minecraft/server/players/PlayerList.java -@@ -1116,6 +1116,10 @@ public abstract class PlayerList { +@@ -1104,6 +1104,10 @@ public abstract class PlayerList { player.getBukkitEntity().recalculatePermissions(); // CraftBukkit this.server.getCommands().sendCommands(player); } // Paper - Add sendOpLevel API @@ -23,10 +23,10 @@ index 001483b7098523f3645a95c81fcf0e38b551705e..70be6c3ef009f1746353cc330a188bc6 public boolean isWhiteListed(GameProfile profile) { diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index a26ec6f1a1553bf0b415f382177c75f481e21180..1f7a97b0a52461108fe5a17d2ecc224b1a9f26a1 100644 +index 0a114ac527026473c86f11dab564ac3c31c41f39..283991c8da3ff07359c89482a72a7238c2cb7e26 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -210,6 +210,7 @@ public abstract class Player extends LivingEntity { +@@ -219,6 +219,7 @@ public abstract class Player extends LivingEntity { private int currentImpulseContextResetGraceTime = 0; public boolean affectsSpawning = true; // Paper - Affects Spawning API public net.kyori.adventure.util.TriState flyingFallDamage = net.kyori.adventure.util.TriState.NOT_SET; // Paper - flying fall damage @@ -70,7 +70,7 @@ index 0fffa384f928ab84451331380968fb4650eafe26..d84a10396395939149da88bcb01be59e return new ChestMenu(MenuType.GENERIC_9x6, containerId, playerInventory, container, 6); } diff --git a/net/minecraft/world/inventory/PlayerEnderChestContainer.java b/net/minecraft/world/inventory/PlayerEnderChestContainer.java -index bc2b95973192069fc64581b59583b19df876f55d..89a2f0286b9ab036f4412a9d657c0105382ed64f 100644 +index beb74bc8398de8b48f41af7daef14d624826310e..5dd6e89931d397b8afdb84024ed46b0d06dcf347 100644 --- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java +++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java @@ -25,11 +25,18 @@ public class PlayerEnderChestContainer extends SimpleContainer { @@ -115,7 +115,7 @@ index 5077a9ff7b78801bdc53536a37aee07b8d86ee4d..fe374f08b7829b846b2a1c2ac3ca500c // Paper end - Fix InventoryOpenEvent cancellation - moved up; player.awardStat(Stats.OPEN_ENDERCHEST); diff --git a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java -index 027502d0af5512c31878978c4d05c52fa3029cca..e05239582477157bd530222704bf43b1254c63ca 100644 +index d679ab599dfd0bdbdc3ab5530d7fcd1c38baf7fa..6b4e2956222a0ca7f72f73032dc98878fbd257ee 100644 --- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java @@ -56,7 +56,17 @@ public class BarrelBlockEntity extends RandomizableContainerBlockEntity { diff --git a/lophine-server/minecraft-patches/features/0009-Stackable-ShulkerBoxes.patch b/lophine-server/minecraft-patches/features/0009-Stackable-ShulkerBoxes.patch index 3ef283a..45ba4e5 100644 --- a/lophine-server/minecraft-patches/features/0009-Stackable-ShulkerBoxes.patch +++ b/lophine-server/minecraft-patches/features/0009-Stackable-ShulkerBoxes.patch @@ -24,10 +24,10 @@ index 643797124fe5a4489d0b7419b7e600c04f283ef2..3b4d97c76db9c742072c92dd7c8b3955 return itemStack; } diff --git a/net/minecraft/server/commands/GiveCommand.java b/net/minecraft/server/commands/GiveCommand.java -index f06753a8fa1138fa165de0a8367e04d79eaad381..267d9d2532302a7fb4ba55e8920dbb8891b2c232 100644 +index 5d6ed73d332722ed23b2ffa8aaef38d31274dfd8..5942f8a75343ead4ee2925f193c56ab7a2b32cb9 100644 --- a/net/minecraft/server/commands/GiveCommand.java +++ b/net/minecraft/server/commands/GiveCommand.java -@@ -52,7 +52,7 @@ public class GiveCommand { +@@ -55,7 +55,7 @@ public class GiveCommand { private static int giveItem(CommandSourceStack source, ItemInput item, Collection targets, int count) throws CommandSyntaxException { ItemStack itemStack = item.createItemStack(1, false); final Component displayName = itemStack.getDisplayName(); // Paper - get display name early @@ -37,10 +37,10 @@ index f06753a8fa1138fa165de0a8367e04d79eaad381..267d9d2532302a7fb4ba55e8920dbb88 if (count > i) { source.sendFailure(Component.translatable("commands.give.failed.toomanyitems", i, itemStack.getDisplayName())); diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4fc3c9f2b04711569c12a0efa027601fdd0a40b5..a726ce12ecac55912606c4a1958b5afa07c491bc 100644 +index 4ced5b334fbfe68ce8eef38eeea5af6d007cea00..a770d2c84e1dfa41cdf1a4458b62c23e3cc78113 100644 --- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3056,7 +3056,7 @@ public class ServerGamePacketListenerImpl +@@ -3066,7 +3066,7 @@ public class ServerGamePacketListenerImpl } else if (slot.mayPlace(cursor)) { if (ItemStack.isSameItemSameComponents(clickedItem, cursor)) { int toPlace = packet.buttonNum() == 0 ? cursor.getCount() : 1; @@ -49,7 +49,7 @@ index 4fc3c9f2b04711569c12a0efa027601fdd0a40b5..a726ce12ecac55912606c4a1958b5afa toPlace = Math.min(toPlace, slot.container.getMaxStackSize() - clickedItem.getCount()); if (toPlace == 1) { action = InventoryAction.PLACE_ONE; -@@ -3092,7 +3092,7 @@ public class ServerGamePacketListenerImpl +@@ -3102,7 +3102,7 @@ public class ServerGamePacketListenerImpl } } else if (ItemStack.isSameItemSameComponents(cursor, clickedItem)) { if (clickedItem.getCount() >= 0) { @@ -58,7 +58,7 @@ index 4fc3c9f2b04711569c12a0efa027601fdd0a40b5..a726ce12ecac55912606c4a1958b5afa // As of 1.5, this is result slots only action = InventoryAction.PICKUP_ALL; } -@@ -3351,6 +3351,7 @@ public class ServerGamePacketListenerImpl +@@ -3361,6 +3361,7 @@ public class ServerGamePacketListenerImpl this.player.containerMenu.broadcastFullState(); } else { this.player.containerMenu.broadcastChanges(); @@ -66,7 +66,7 @@ index 4fc3c9f2b04711569c12a0efa027601fdd0a40b5..a726ce12ecac55912606c4a1958b5afa } if (io.papermc.paper.configuration.GlobalConfiguration.get().unsupportedSettings.updateEquipmentOnPlayerActions) this.player.detectEquipmentUpdates(); // Paper - Force update attributes. } -@@ -3463,7 +3464,7 @@ public class ServerGamePacketListenerImpl +@@ -3471,7 +3472,7 @@ public class ServerGamePacketListenerImpl } boolean flag1 = packet.slotNum() >= 1 && packet.slotNum() <= 45; @@ -75,7 +75,7 @@ index 4fc3c9f2b04711569c12a0efa027601fdd0a40b5..a726ce12ecac55912606c4a1958b5afa if (flag || (flag1 && !ItemStack.matches(this.player.inventoryMenu.getSlot(packet.slotNum()).getItem(), packet.itemStack()))) { // Insist on valid slot // CraftBukkit start - Call click event org.bukkit.inventory.InventoryView inventory = this.player.inventoryMenu.getBukkitView(); -@@ -3505,6 +3506,7 @@ public class ServerGamePacketListenerImpl +@@ -3513,6 +3514,7 @@ public class ServerGamePacketListenerImpl this.player.inventoryMenu.getSlot(packet.slotNum()).setByPlayer(itemStack); this.player.inventoryMenu.setRemoteSlot(packet.slotNum(), itemStack); this.player.inventoryMenu.broadcastChanges(); @@ -101,7 +101,7 @@ index b382665cc125b8b5c0938e5e55984e4bf91d37ff..5d8bd05f966cf9befe8b8f3359b2fa4c boolean stillValid(Player player); diff --git a/net/minecraft/world/SimpleContainer.java b/net/minecraft/world/SimpleContainer.java -index 133e042371bcf84f1935903ec57d204e3b7abd84..201599988e20219b6a99bf1594ad6c0c19e09038 100644 +index d907e24d563e27acab2f2bf9711b1755ea9afd19..6189cb7c1745a242b610e89c859cc849f16cc9e3 100644 --- a/net/minecraft/world/SimpleContainer.java +++ b/net/minecraft/world/SimpleContainer.java @@ -211,7 +211,7 @@ public class SimpleContainer implements Container, StackedContentsCompatible { @@ -123,10 +123,10 @@ index 133e042371bcf84f1935903ec57d204e3b7abd84..201599988e20219b6a99bf1594ad6c0c if (min > 0) { other.grow(min); diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java -index a9cc35b4b253d9a7fd90f811af9be629b164fad0..1e0c8a256b9602a56f607274e93208bf5b04ee0d 100644 +index 244996de73d75e812e27aa896cd3875a14179b74..74e207b9e173facc8279db27b2dd1dd4faf71313 100644 --- a/net/minecraft/world/entity/item/ItemEntity.java +++ b/net/minecraft/world/entity/item/ItemEntity.java -@@ -281,10 +281,45 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -271,10 +271,45 @@ public class ItemEntity extends Entity implements TraceableEntity { private boolean isMergable() { ItemStack item = this.getItem(); @@ -174,10 +174,10 @@ index a9cc35b4b253d9a7fd90f811af9be629b164fad0..1e0c8a256b9602a56f607274e93208bf ItemStack item1 = itemEntity.getItem(); if (Objects.equals(this.target, itemEntity.target) && areMergable(item, item1)) { diff --git a/net/minecraft/world/entity/player/Inventory.java b/net/minecraft/world/entity/player/Inventory.java -index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..9020f7c83e5bd19e9a9d3748d200ce5772a9cefa 100644 +index a6bb436dc80daf6901dc027a6011ead4b3ed27e2..53210a7d32241c47c2b1cd698b515726f0a1fd0d 100644 --- a/net/minecraft/world/entity/player/Inventory.java +++ b/net/minecraft/world/entity/player/Inventory.java -@@ -149,8 +149,8 @@ public class Inventory implements Container, Nameable { +@@ -166,8 +166,8 @@ public class Inventory implements Container, Nameable { private boolean hasRemainingSpaceForItem(ItemStack destination, ItemStack origin) { return !destination.isEmpty() @@ -188,7 +188,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..9020f7c83e5bd19e9a9d3748d200ce57 && ItemStack.isSameItemSameComponents(destination, origin); // Paper - check if itemstack is stackable first } -@@ -164,7 +164,7 @@ public class Inventory implements Container, Nameable { +@@ -181,7 +181,7 @@ public class Inventory implements Container, Nameable { } if (this.hasRemainingSpaceForItem(itemInSlot, itemStack)) { @@ -197,7 +197,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..9020f7c83e5bd19e9a9d3748d200ce57 } if (remains <= 0) { return itemStack.getCount(); -@@ -173,7 +173,7 @@ public class Inventory implements Container, Nameable { +@@ -190,7 +190,7 @@ public class Inventory implements Container, Nameable { ItemStack itemInOffhand = this.equipment.get(EquipmentSlot.OFFHAND); if (this.hasRemainingSpaceForItem(itemInOffhand, itemStack)) { @@ -206,7 +206,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..9020f7c83e5bd19e9a9d3748d200ce57 } if (remains <= 0) { return itemStack.getCount(); -@@ -297,7 +297,7 @@ public class Inventory implements Container, Nameable { +@@ -314,7 +314,7 @@ public class Inventory implements Container, Nameable { this.setItem(slot, item); } @@ -215,7 +215,7 @@ index d9cb4f0ed0c4f63362c837aeef3c4194911455c9..9020f7c83e5bd19e9a9d3748d200ce57 int min = Math.min(count, i); if (min == 0) { return count; -@@ -403,7 +403,7 @@ public class Inventory implements Container, Nameable { +@@ -420,7 +420,7 @@ public class Inventory implements Container, Nameable { break; } @@ -238,7 +238,7 @@ index 83ccde54c625d40dc595e000c533f60aa929bd5a..3206b599481eeab29c58bc1ca9cac693 public void accountStack(ItemStack stack, int maxStackSize) { diff --git a/net/minecraft/world/entity/vehicle/ContainerEntity.java b/net/minecraft/world/entity/vehicle/ContainerEntity.java -index feebd1610ebd3c26a337259c14f5c774dc72b937..7df6ff842e41763aec2d88d1f8a5f7503932d905 100644 +index 02d2efef2dc0f0e12eac0c71fa290af706f7694d..d042b3729a615bdabeb08f559ac895a731856545 100644 --- a/net/minecraft/world/entity/vehicle/ContainerEntity.java +++ b/net/minecraft/world/entity/vehicle/ContainerEntity.java @@ -163,7 +163,7 @@ public interface ContainerEntity extends Container, MenuProvider { @@ -251,7 +251,7 @@ index feebd1610ebd3c26a337259c14f5c774dc72b937..7df6ff842e41763aec2d88d1f8a5f750 default SlotAccess getChestVehicleSlot(final int index) { diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java -index a9cf0ef95b706f05060bbcd2a4f5a03c60f783d2..45ff5b9a50bdec611f7c1aa4cb77fb0b13b6910c 100644 +index 852b4381985ed167b05881f068e9542c31cdaf23..379ccae078370b4e8fc909e642f1a70066f70ebf 100644 --- a/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -234,6 +234,14 @@ public abstract class AbstractContainerMenu { @@ -378,10 +378,10 @@ index 5ceb8964476b40db4511bec91ff13c4f522a1357..dd978d1590fb896775a240ed87e38d85 @Nullable diff --git a/net/minecraft/world/item/ItemStack.java b/net/minecraft/world/item/ItemStack.java -index 09455150810e4fb6e4637fdb9e2e8a30fe0bc247..9ea26913cbaa7571a107b421614380e2755f4430 100644 +index 2c15a382dcbd1087dc06b562149239c8bf4e035e..25b0f7ee2d80bcfa10e850fa59001d0da7b5fd9c 100644 --- a/net/minecraft/world/item/ItemStack.java +++ b/net/minecraft/world/item/ItemStack.java -@@ -165,7 +165,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -162,7 +162,7 @@ public final class ItemStack implements DataComponentHolder { @Deprecated @Nullable private Item item; @@ -390,7 +390,7 @@ index 09455150810e4fb6e4637fdb9e2e8a30fe0bc247..9ea26913cbaa7571a107b421614380e2 @Nullable private Entity entityRepresentation; -@@ -192,7 +192,8 @@ public final class ItemStack implements DataComponentHolder { +@@ -189,7 +189,8 @@ public final class ItemStack implements DataComponentHolder { } else { Holder holder = Item.STREAM_CODEC.decode(buffer); DataComponentPatch dataComponentPatch = codec.decode(buffer); @@ -400,7 +400,7 @@ index 09455150810e4fb6e4637fdb9e2e8a30fe0bc247..9ea26913cbaa7571a107b421614380e2 } } -@@ -201,13 +202,15 @@ public final class ItemStack implements DataComponentHolder { +@@ -198,13 +199,15 @@ public final class ItemStack implements DataComponentHolder { if (value.isEmpty() || value.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem() buffer.writeVarInt(0); } else { @@ -420,7 +420,7 @@ index 09455150810e4fb6e4637fdb9e2e8a30fe0bc247..9ea26913cbaa7571a107b421614380e2 } finally { net.minecraft.network.chat.ComponentSerialization.DONT_RENDER_TRANSLATABLES.set(prev); } -@@ -302,7 +305,7 @@ public final class ItemStack implements DataComponentHolder { +@@ -299,7 +302,7 @@ public final class ItemStack implements DataComponentHolder { for (ItemStack itemStack : itemContainerContents.nonEmptyItems()) { int count = itemStack.getCount(); @@ -430,10 +430,10 @@ index 09455150810e4fb6e4637fdb9e2e8a30fe0bc247..9ea26913cbaa7571a107b421614380e2 return DataResult.error(() -> "Item stack with count of " + count + " was larger than maximum: " + maxStackSize); } diff --git a/net/minecraft/world/level/block/AbstractCauldronBlock.java b/net/minecraft/world/level/block/AbstractCauldronBlock.java -index ad3f32888afd8b5f0038445a1b0fcc8cacec9fe2..3e3d516ff62f49a3cc00375d173af137b555d515 100644 +index 1a927b08f86c0585e62d8c4207954ab36d3316ee..e9899a03b15a2ca3dbd941775f14b041bbcfc85e 100644 --- a/net/minecraft/world/level/block/AbstractCauldronBlock.java +++ b/net/minecraft/world/level/block/AbstractCauldronBlock.java -@@ -62,9 +62,27 @@ public abstract class AbstractCauldronBlock extends Block { +@@ -57,9 +57,27 @@ public abstract class AbstractCauldronBlock extends Block { ItemStack stack, BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hitResult ) { CauldronInteraction cauldronInteraction = this.interactions.map().get(stack.getItem()); @@ -476,7 +476,7 @@ index 38b03c7b02bdfc579e5e126c12de3d878e26d188..33e24f2c3b63b2d3b55dfae2f2e55869 org.bukkit.craftbukkit.inventory.CraftItemStack oitemstack = org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack); diff --git a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index c5b3b5e5f621f8db152aa190374ae0fe567d6828..0ca27b83151c3e7be3d681aa087fa72fb5bef0c3 100644 +index 36a72a11d28f99bfe85868461925b778cc01478e..831900a4ed6ca335707289391a095af7717a01a4 100644 --- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -409,7 +409,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -489,10 +489,10 @@ index c5b3b5e5f621f8db152aa190374ae0fe567d6828..0ca27b83151c3e7be3d681aa087fa72f this.cookingTotalTime = getTotalCookTime(serverLevel, this, this.recipeType, this.cookSpeedMultiplier); // Paper - cook speed multiplier API this.cookingTimer = 0; diff --git a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -index c63370fd458fb4f7190b79b1a8174fcc92d88f9c..4cca3fbbb93bb76d5d501dfad6997d909211809e 100644 +index 5a094257a31f0500278a706a418e1697f8810ffb..1f132848ae284668c05d6ca17d5890fa341e14cd 100644 --- a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java +++ b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -@@ -148,7 +148,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co +@@ -145,7 +145,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co @Override public void setItem(int slot, ItemStack stack) { this.getItems().set(slot, stack); @@ -502,7 +502,7 @@ index c63370fd458fb4f7190b79b1a8174fcc92d88f9c..4cca3fbbb93bb76d5d501dfad6997d90 } diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 6f5a47a3e9452f25b318e4a7a628e917da99c96f..52032c6bbc7e1c37a50d9b7334f1830896cb462d 100644 +index 5de769e7bd56bb3355c3c711d46ce5e103ea4409..061501979195cf43c6da4d4b6cf6359251978bd3 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -123,7 +123,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen diff --git a/lophine-server/minecraft-patches/features/0010-Better-ShulkerBox.patch b/lophine-server/minecraft-patches/features/0010-Better-ShulkerBox.patch index 67600b8..2a54bb0 100644 --- a/lophine-server/minecraft-patches/features/0010-Better-ShulkerBox.patch +++ b/lophine-server/minecraft-patches/features/0010-Better-ShulkerBox.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Better ShulkerBox You can open shulker box with shift & right click diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index a4eeb75eeb1cd69c60cd1c273f23f9744837148f..5596214edb14d30c9ed5af4ffdcdd2041d135c6d 100644 +index 528d0a111b36e51d8943a013b36c378d442ef2dd..2e03b114dd2b8c0816621c7522fb9654025d7111 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -2351,6 +2351,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -2450,6 +2450,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.containerMenu.removed(this); this.inventoryMenu.transferState(this.containerMenu); this.containerMenu = this.inventoryMenu; @@ -18,10 +18,10 @@ index a4eeb75eeb1cd69c60cd1c273f23f9744837148f..5596214edb14d30c9ed5af4ffdcdd204 @Override diff --git a/net/minecraft/world/entity/player/Inventory.java b/net/minecraft/world/entity/player/Inventory.java -index 9020f7c83e5bd19e9a9d3748d200ce5772a9cefa..5bd913911075c0d93f4434e88c9cf7f3ac7248fc 100644 +index 53210a7d32241c47c2b1cd698b515726f0a1fd0d..399a7424712471329ca82094839859bbac8ed087 100644 --- a/net/minecraft/world/entity/player/Inventory.java +++ b/net/minecraft/world/entity/player/Inventory.java -@@ -299,6 +299,11 @@ public class Inventory implements Container, Nameable { +@@ -316,6 +316,11 @@ public class Inventory implements Container, Nameable { int i = this.getMaxStackLeaves(item) - item.getCount(); int min = Math.min(count, i); @@ -33,7 +33,7 @@ index 9020f7c83e5bd19e9a9d3748d200ce5772a9cefa..5bd913911075c0d93f4434e88c9cf7f3 if (min == 0) { return count; } else { -@@ -351,6 +356,11 @@ public class Inventory implements Container, Nameable { +@@ -368,6 +373,11 @@ public class Inventory implements Container, Nameable { if (slot >= 0) { this.items.set(slot, stack.copyAndClear()); this.items.get(slot).setPopTime(5); @@ -46,10 +46,10 @@ index 9020f7c83e5bd19e9a9d3748d200ce5772a9cefa..5bd913911075c0d93f4434e88c9cf7f3 } else if (this.player.hasInfiniteMaterials()) { stack.setCount(0); diff --git a/net/minecraft/world/entity/player/Player.java b/net/minecraft/world/entity/player/Player.java -index 1f7a97b0a52461108fe5a17d2ecc224b1a9f26a1..86854467df17cc72e48360a0f19a4bbe4aaba3e8 100644 +index 283991c8da3ff07359c89482a72a7238c2cb7e26..5320f57897d673f3468b2bfecee4768bb00ef783 100644 --- a/net/minecraft/world/entity/player/Player.java +++ b/net/minecraft/world/entity/player/Player.java -@@ -595,11 +595,13 @@ public abstract class Player extends LivingEntity { +@@ -605,11 +605,13 @@ public abstract class Player extends LivingEntity { // Paper start - special close for unloaded inventory public void closeUnloadedInventory(org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) { this.containerMenu = this.inventoryMenu; @@ -64,7 +64,7 @@ index 1f7a97b0a52461108fe5a17d2ecc224b1a9f26a1..86854467df17cc72e48360a0f19a4bbe protected void doCloseContainer() { diff --git a/net/minecraft/world/inventory/AbstractContainerMenu.java b/net/minecraft/world/inventory/AbstractContainerMenu.java -index 45ff5b9a50bdec611f7c1aa4cb77fb0b13b6910c..606025e0e4bfbcc996ce5a54ccf74c74430531a1 100644 +index 379ccae078370b4e8fc909e642f1a70066f70ebf..c28629f8900bf4c51a0daa1a8effd6c405ab1526 100644 --- a/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -658,6 +658,11 @@ public abstract class AbstractContainerMenu { @@ -93,7 +93,7 @@ index 903025c659e6a9423224fe65973696405c69ec6a..eb20f83d5aa2c06f60c3941e8a544347 } diff --git a/net/minecraft/world/item/Item.java b/net/minecraft/world/item/Item.java -index c52fb17d1e496a91223b7387cacb128c1865caee..af070f075b1b6523040a4ff29ef37c730af28427 100644 +index 40cb5e6bbcf9dbdb400f1503e86c0804b60e07be..8c279c6ed58f1af451170f9633e3a32f9ab59ee0 100644 --- a/net/minecraft/world/item/Item.java +++ b/net/minecraft/world/item/Item.java @@ -187,6 +187,13 @@ public class Item implements FeatureElement, ItemLike { @@ -124,7 +124,7 @@ index ecf794f94177fc7b6df483516d920719fbc6fa43..4fda59a4c17009a0009f3d3c13258f4f throw new IllegalArgumentException("Got " + items.size() + " items, but maximum is 256"); } else { diff --git a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java -index 87ebdb6deb66662a38b3eec0dae27eaf859ecabb..a36080d522841c4d9b186b475aa6667d1942c0eb 100644 +index ebea67223ce1d350087c73dff0cc3fe6d7b47ca0..efbe87de81ad23d0d248dfa487d20190c6049cf4 100644 --- a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java +++ b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java @@ -46,6 +46,10 @@ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity impl @@ -152,8 +152,8 @@ index 87ebdb6deb66662a38b3eec0dae27eaf859ecabb..a36080d522841c4d9b186b475aa6667d + // Lophine end - better shulker box + @Override - protected void loadAdditional(CompoundTag tag, HolderLookup.Provider registries) { - super.loadAdditional(tag, registries); + protected void loadAdditional(ValueInput input) { + super.loadAdditional(input); @@ -258,12 +271,12 @@ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity impl } diff --git a/lophine-server/minecraft-patches/features/0011-Spawn-invulnerable-time.patch b/lophine-server/minecraft-patches/features/0011-Spawn-invulnerable-time.patch index 2a84cc0..374e65a 100644 --- a/lophine-server/minecraft-patches/features/0011-Spawn-invulnerable-time.patch +++ b/lophine-server/minecraft-patches/features/0011-Spawn-invulnerable-time.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Spawn invulnerable time diff --git a/net/minecraft/server/level/ServerPlayer.java b/net/minecraft/server/level/ServerPlayer.java -index 5596214edb14d30c9ed5af4ffdcdd2041d135c6d..bf76bdf5f4c5a490f8de8d924b371cd98b63bfa4 100644 +index 2e03b114dd2b8c0816621c7522fb9654025d7111..4394341c31fec6bffbb4da0c8b5043170f8e9ea4 100644 --- a/net/minecraft/server/level/ServerPlayer.java +++ b/net/minecraft/server/level/ServerPlayer.java -@@ -221,6 +221,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -232,6 +232,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc private int lastSentFood = -99999999; private boolean lastFoodSaturationZero = true; public int lastSentExp = -99999999; @@ -16,7 +16,7 @@ index 5596214edb14d30c9ed5af4ffdcdd2041d135c6d..bf76bdf5f4c5a490f8de8d924b371cd9 private ChatVisiblity chatVisibility = ChatVisiblity.FULL; public ParticleStatus particleStatus = ParticleStatus.ALL; private boolean canChatColor = true; -@@ -923,6 +924,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -991,6 +992,7 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc this.tickClientLoadTimeout(); this.gameMode.tick(); this.wardenSpawnTracker.tick(); @@ -24,7 +24,7 @@ index 5596214edb14d30c9ed5af4ffdcdd2041d135c6d..bf76bdf5f4c5a490f8de8d924b371cd9 if (this.invulnerableTime > 0) { this.invulnerableTime--; } -@@ -1420,6 +1422,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc +@@ -1497,6 +1499,13 @@ public class ServerPlayer extends Player implements ca.spottedleaf.moonrise.patc if (this.isInvulnerableTo(level, damageSource)) { return false; } else { diff --git a/lophine-server/minecraft-patches/features/0012-Old-nether-portal-collision.patch b/lophine-server/minecraft-patches/features/0012-Old-nether-portal-collision.patch deleted file mode 100644 index e1a8948..0000000 --- a/lophine-server/minecraft-patches/features/0012-Old-nether-portal-collision.patch +++ /dev/null @@ -1,20 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Helvetica Volubi -Date: Sun, 18 May 2025 23:48:59 +0800 -Subject: [PATCH] Old nether portal collision - -This patch should removed in 1.21.6 when mojang revert it. - -diff --git a/net/minecraft/world/level/block/NetherPortalBlock.java b/net/minecraft/world/level/block/NetherPortalBlock.java -index 421ea9c748159ac989900427a13abe9b244dc7aa..a5a220e6d41c992d1db8617069aa00eddcf7b95a 100644 ---- a/net/minecraft/world/level/block/NetherPortalBlock.java -+++ b/net/minecraft/world/level/block/NetherPortalBlock.java -@@ -65,7 +65,7 @@ public class NetherPortalBlock extends Block implements Portal { - - @Override - protected VoxelShape getEntityInsideCollisionShape(BlockState state, BlockGetter level, BlockPos pos, Entity entity) { -- return state.getShape(level, pos); -+ return fun.bm.lophine.config.modules.misc.OldFeatureConfig.oldNetherPortalCollision ? Shapes.block() : state.getShape(level, pos); // Lophine - Old nether portal collision - } - - @Override diff --git a/lophine-server/minecraft-patches/features/0013-Old-zombie-reinforcement.patch b/lophine-server/minecraft-patches/features/0012-Old-zombie-reinforcement.patch similarity index 86% rename from lophine-server/minecraft-patches/features/0013-Old-zombie-reinforcement.patch rename to lophine-server/minecraft-patches/features/0012-Old-zombie-reinforcement.patch index 4729f6a..bd2d34e 100644 --- a/lophine-server/minecraft-patches/features/0013-Old-zombie-reinforcement.patch +++ b/lophine-server/minecraft-patches/features/0012-Old-zombie-reinforcement.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Old zombie reinforcement diff --git a/net/minecraft/world/entity/monster/Zombie.java b/net/minecraft/world/entity/monster/Zombie.java -index 4395947fc8c719864ac2afde5e6bbb53da5129c2..f2b2859084bcff3a004d9b4bfac1f51e75970d39 100644 +index 14d0758aca54d9a25e369dfa8c89c930f27946c9..6f1f26b7f759e56f843e674167470da943785728 100644 --- a/net/minecraft/world/entity/monster/Zombie.java +++ b/net/minecraft/world/entity/monster/Zombie.java -@@ -342,7 +342,7 @@ public class Zombie extends Monster { +@@ -341,7 +341,7 @@ public class Zombie extends Monster { int floor = Mth.floor(this.getX()); int floor1 = Mth.floor(this.getY()); int floor2 = Mth.floor(this.getZ()); diff --git a/lophine-server/minecraft-patches/features/0014-Old-replaceable-by-mushrooms.patch b/lophine-server/minecraft-patches/features/0013-Old-replaceable-by-mushrooms.patch similarity index 94% rename from lophine-server/minecraft-patches/features/0014-Old-replaceable-by-mushrooms.patch rename to lophine-server/minecraft-patches/features/0013-Old-replaceable-by-mushrooms.patch index c7e4d08..30e4142 100644 --- a/lophine-server/minecraft-patches/features/0014-Old-replaceable-by-mushrooms.patch +++ b/lophine-server/minecraft-patches/features/0013-Old-replaceable-by-mushrooms.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Old replaceable by mushrooms diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java -index ba1ccd6eab77e27a38d22c12dba0797d65cc4c4e..373f91df79fc7a7bd6fd137bf53b8a55dd745e31 100644 +index 93d722d437121e605cee0e168ac17ee9bef0610e..3f2755aab2c3c1715f7b6056181fff4a1c9e94b6 100644 --- a/net/minecraft/world/level/Level.java +++ b/net/minecraft/world/level/Level.java @@ -11,6 +11,8 @@ import java.util.function.Consumer; @@ -27,7 +27,7 @@ index ba1ccd6eab77e27a38d22c12dba0797d65cc4c4e..373f91df79fc7a7bd6fd137bf53b8a55 CraftBlockState blockstate = worldData.capturedBlockStates.get(pos); // Folia - region threading if (blockstate == null) { diff --git a/net/minecraft/world/level/block/state/BlockBehaviour.java b/net/minecraft/world/level/block/state/BlockBehaviour.java -index 834e27ef2f7b342b074ff9e1e390e02f3ca1c399..f5765e3bbf9e735d6f959e1bf6ee1846ee11b4e9 100644 +index d4c02b9bb9bfc10484a79ede35985ba35c99bada..fd6afb7c572a370f0db4bf3937a0cff10e844a96 100644 --- a/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -770,6 +770,14 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/lophine-server/minecraft-patches/features/0015-I18n-support.patch b/lophine-server/minecraft-patches/features/0014-I18n-support.patch similarity index 88% rename from lophine-server/minecraft-patches/features/0015-I18n-support.patch rename to lophine-server/minecraft-patches/features/0014-I18n-support.patch index 55db145..05edadf 100644 --- a/lophine-server/minecraft-patches/features/0015-I18n-support.patch +++ b/lophine-server/minecraft-patches/features/0014-I18n-support.patch @@ -5,13 +5,13 @@ Subject: [PATCH] I18n support diff --git a/net/minecraft/server/dedicated/DedicatedServer.java b/net/minecraft/server/dedicated/DedicatedServer.java -index 1b60378cdbf5bc88f996010a61cceec7c2b9e2dc..dd701b07c4d5894516f613aca687a969f1bbee90 100644 +index 45cd92cd69bcb66b94bc6278f2897ea4a31c45b6..48057abf3c127aab0458078f891a32ec5f6b9baa 100644 --- a/net/minecraft/server/dedicated/DedicatedServer.java +++ b/net/minecraft/server/dedicated/DedicatedServer.java @@ -172,6 +172,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess()); // Paper end - initialize global and world-defaults configuration - fun.bm.lophine.config.LophineConfig.loadConfigFiles(); //Luminol - load config file // Lophine - load config file + fun.bm.lophine.config.LophineConfig.loadConfigFiles(); // Lophine - load config file + fun.bm.lophine.utils.ServerI18nUtil.init(); // Lophine - I18n support if (false) this.server.spark.enableEarlyIfRequested(); // Paper - spark // Luminol - Force disable builtin spark // Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save diff --git a/lophine-server/paper-patches/features/0001-Rebrand-to-Lophine.patch b/lophine-server/paper-patches/features/0001-Rebrand-to-Lophine.patch index 8b2568e..45481b9 100644 --- a/lophine-server/paper-patches/features/0001-Rebrand-to-Lophine.patch +++ b/lophine-server/paper-patches/features/0001-Rebrand-to-Lophine.patch @@ -57,7 +57,7 @@ index 22125dbe1765f930fe10fe420be1c275ec553139..d5b070d1a3d84e228960dacd614e0f1a final @Nullable Component history = this.getHistory(); diff --git a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java -index e3c5f4c31f084294a59830f3e764921433dd80d5..fe0f4aee0ad92e2e9713f88e328d6588f494dfd3 100644 +index 4ada790812957657d580cb748077c4961987d0cb..3a539df860305e777e85ed6dc72b5effe76734b4 100644 --- a/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java +++ b/src/main/java/io/papermc/paper/ServerBuildInfoImpl.java @@ -31,7 +31,7 @@ public record ServerBuildInfoImpl( @@ -78,8 +78,8 @@ index e3c5f4c31f084294a59830f3e764921433dd80d5..fe0f4aee0ad92e2e9713f88e328d6588 getManifestAttribute(manifest, ATTRIBUTE_BRAND_NAME) - .orElse(BRAND_LUMINOL_NAME), // Folia // Luminol + .orElse(BRAND_LOPHINE_NAME), // Folia // Luminol // Lophine - SharedConstants.getCurrentVersion().getId(), - SharedConstants.getCurrentVersion().getName(), + SharedConstants.getCurrentVersion().id(), + SharedConstants.getCurrentVersion().name(), getManifestAttribute(manifest, ATTRIBUTE_BUILD_NUMBER) @@ -62,7 +62,7 @@ public record ServerBuildInfoImpl( diff --git a/lophine-server/src/main/java/fun/bm/lophine/config/modules/misc/OldFeatureConfig.java b/lophine-server/src/main/java/fun/bm/lophine/config/modules/misc/OldFeatureConfig.java index 89d126a..71597ee 100644 --- a/lophine-server/src/main/java/fun/bm/lophine/config/modules/misc/OldFeatureConfig.java +++ b/lophine-server/src/main/java/fun/bm/lophine/config/modules/misc/OldFeatureConfig.java @@ -5,9 +5,6 @@ import me.earthme.luminol.config.IConfigModule; import me.earthme.luminol.config.flags.ConfigInfo; public class OldFeatureConfig implements IConfigModule { - @ConfigInfo(baseName = "old_nether_portal_collision") - public static boolean oldNetherPortalCollision = false; - @ConfigInfo(baseName = "spawn_invulnerable_time") public static boolean spawnInvulnerableTime = false; diff --git a/lophine-server/src/main/java/fun/bm/lophine/config/modules/removed/RemovedConfig.java b/lophine-server/src/main/java/fun/bm/lophine/config/modules/removed/RemovedConfig.java index 7f6b012..7e83612 100644 --- a/lophine-server/src/main/java/fun/bm/lophine/config/modules/removed/RemovedConfig.java +++ b/lophine-server/src/main/java/fun/bm/lophine/config/modules/removed/RemovedConfig.java @@ -6,7 +6,7 @@ import me.earthme.luminol.config.flags.ConfigInfo; import me.earthme.luminol.config.flags.TransformedConfig; public class RemovedConfig implements IConfigModule { - @TransformedConfig(name = "example", category = {"removed", "example"}, transform = false) + @TransformedConfig(name = "old_nether_portal_collision", category = {"misc", "old-feature"}, transform = false) @ConfigInfo(baseName = "removed", comments = """ RemovedConfig redirect to here, no any function.""") diff --git a/lophine-server/src/main/java/fun/bm/lophine/utils/ServerI18nUtil.java b/lophine-server/src/main/java/fun/bm/lophine/utils/ServerI18nUtil.java index 941b02d..61338c7 100644 --- a/lophine-server/src/main/java/fun/bm/lophine/utils/ServerI18nUtil.java +++ b/lophine-server/src/main/java/fun/bm/lophine/utils/ServerI18nUtil.java @@ -39,7 +39,7 @@ import java.util.logging.Logger; public class ServerI18nUtil { private static final Logger logger = Logger.getLogger("LangLoader"); - private static final String VERSION = DetectedVersion.BUILT_IN.getName(); + private static final String VERSION = DetectedVersion.BUILT_IN.name(); private static final String BASE_PATH = "cache/lophine/" + VERSION + "/"; private static final String manifestUrl = "https://launchermeta.mojang.com/mc/game/version_manifest.json"; private static final String resourceBaseUrl = "https://resources.download.minecraft.net/";