From 0cc941be27f2abf37399195112ae2e6dec8aed9a Mon Sep 17 00:00:00 2001 From: NanaChiyo0721 Date: Mon, 17 Aug 2026 23:55:29 +0800 Subject: [PATCH] Fix compile err --- .../features/0056-Leaves-Vanilla-hopper.patch | 8 ++++---- .../0057-Leaves-Lithium-Sleeping-Block-Entity.patch | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/shiroha-server/minecraft-patches/features/0056-Leaves-Vanilla-hopper.patch b/shiroha-server/minecraft-patches/features/0056-Leaves-Vanilla-hopper.patch index 47eca9c..db46e41 100644 --- a/shiroha-server/minecraft-patches/features/0056-Leaves-Vanilla-hopper.patch +++ b/shiroha-server/minecraft-patches/features/0056-Leaves-Vanilla-hopper.patch @@ -1,7 +1,7 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: NanaChiyo0721 Date: Mon, 17 Aug 2026 23:38:00 +0800 -Subject: [PATCH] Leaves: Vanilla hopper +Subject: [PATCH] Leaves Vanilla hopper Co-Authored-By: Creeam <102713261+HaHaWTH@users.noreply.github.com> @@ -11,7 +11,7 @@ Original project: https://github.com/LeavesMC/Leaves This is a temporary solution designed to attempt to restore the vanilla behavior of the funnel while preserving optimizations as much as possible. It should ultimately be replaced by the optimization solution provided by lithium. diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index a858cb658af70f07614fa1f4d9e8a3435d5c161f..9f7f8edaf3261cc0377dab33404ca1d30c548ff9 100644 +index a858cb658af70f07614fa1f4d9e8a3435d5c161f..b418d11d5bff749c3eaf1b34c5727bfa8c295dbd 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -281,36 +281,67 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -21,10 +21,10 @@ index a858cb658af70f07614fa1f4d9e8a3435d5c161f..9f7f8edaf3261cc0377dab33404ca1d3 - container.setChanged(); // original logic always marks source inv as changed even if no move happens. - movedItem.setCount(movedItemCount); + // Leaves start - Vanilla hopper -+ if (org.dreeam.leaf.config.modules.gameplay.VanillaHopper.enabled && movedItemCount == 1) { ++ if (movedItemCount == 1) { + movedItem.setCount(movedItemCount); + container.setChanged(); -+ if (!skipPullModeEventFire) { ++ if (!worldData.skipPullModeEventFire) { + movedItem = callPullMoveEvent(hopper, container, movedItem); + if (movedItem == null) { // cancelled + origItemStack.setCount(originalItemCount); diff --git a/shiroha-server/minecraft-patches/features/0057-Leaves-Lithium-Sleeping-Block-Entity.patch b/shiroha-server/minecraft-patches/features/0057-Leaves-Lithium-Sleeping-Block-Entity.patch index db52f65..f79ec98 100644 --- a/shiroha-server/minecraft-patches/features/0057-Leaves-Lithium-Sleeping-Block-Entity.patch +++ b/shiroha-server/minecraft-patches/features/0057-Leaves-Lithium-Sleeping-Block-Entity.patch @@ -1573,7 +1573,7 @@ index 6109d8da984b398bb1eb6cd6ab9a55f0511a615c..d3d6b3aeb24da7f3bf92c327095a9dc9 + // Leaves end - Lithium Sleeping Block Entity } diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 9f7f8edaf3261cc0377dab33404ca1d30c548ff9..6dea8c7354708db69406575a03bf847e3e0b1194 100644 +index b418d11d5bff749c3eaf1b34c5727bfa8c295dbd..5772a2d86343f3a82f0f3fd6ad01ecc823560377 100644 --- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -27,8 +27,29 @@ import net.minecraft.world.level.storage.ValueInput;