Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,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 dab2778068afa42ad8719300852b4ac8495a2a09..e1cf1057e9dd6cc859621d791ec62bbb2bcff04b 100644
index dab2778068afa42ad8719300852b4ac8495a2a09..b36ce5488b07c182d6d6a70c1bde9aa8e251a664 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
Expand All @@ -21,7 +21,6 @@ index dab2778068afa42ad8719300852b4ac8495a2a09..e1cf1057e9dd6cc859621d791ec62bbb
+ // Leaves start - Vanilla hopper
+ if (org.dreeam.leaf.config.modules.gameplay.VanillaHopper.enabled && movedItemCount == 1) {
+ movedItem.setCount(movedItemCount);
+ container.setChanged();
+ if (!skipPullModeEventFire) {
+ movedItem = callPullMoveEvent(hopper, container, movedItem);
+ if (movedItem == null) { // cancelled
Expand Down Expand Up @@ -49,6 +48,7 @@ index dab2778068afa42ad8719300852b4ac8495a2a09..e1cf1057e9dd6cc859621d791ec62bbb
+ if (remainingItem.getCount() != itemCountToMove) {
+ origItemStack.setCount(removeOriginalItem ? originalItemCount - movedItemCount : originalItemCount);
+ container.setItem(i, origItemStack);
+ container.setChanged();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

纸张神了 这完全是不一样吧(

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是针对当前补丁的简单修复,给Leaves的PR是完整的重写过了的(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaves那边最好是把这里全抄过去 这里的修复了事件的问题(

return true;
}
- }
Expand Down