aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/1020-Optimize-Hoppers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/1020-Optimize-Hoppers.patch')
-rw-r--r--patches/server/1020-Optimize-Hoppers.patch10
1 files changed, 7 insertions, 3 deletions
diff --git a/patches/server/1020-Optimize-Hoppers.patch b/patches/server/1020-Optimize-Hoppers.patch
index 89784a86e5..33aed0ce2b 100644
--- a/patches/server/1020-Optimize-Hoppers.patch
+++ b/patches/server/1020-Optimize-Hoppers.patch
@@ -62,10 +62,10 @@ index 2cd2e260e9a958c8aee7b2fb4e010ef8fc600f53..b21daeeb043df885fba5e6a7572d311f
this.profiler.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index f444e5b96c1a768690afadec56e17ba67b2f36f2..fb26b3b10a6a12b7da86e30740a1338566faaeb1 100644
+index f444e5b96c1a768690afadec56e17ba67b2f36f2..36e3415b9312d3a80c9f5e1c36b42b7ea30c31c5 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
-@@ -794,7 +794,13 @@ public final class ItemStack implements DataComponentHolder {
+@@ -794,10 +794,16 @@ public final class ItemStack implements DataComponentHolder {
}
public ItemStack copy() {
@@ -79,7 +79,11 @@ index f444e5b96c1a768690afadec56e17ba67b2f36f2..fb26b3b10a6a12b7da86e30740a13385
+ // Paper end - Perf: Optimize Hoppers
return ItemStack.EMPTY;
} else {
- ItemStack itemstack = new ItemStack(this.getItem(), this.count, this.components.copy());
+- ItemStack itemstack = new ItemStack(this.getItem(), this.count, this.components.copy());
++ ItemStack itemstack = new ItemStack(originalItem ? this.item : this.getItem(), this.count, this.components.copy()); // Paper - Perf: Optimize Hoppers
+
+ itemstack.setPopTime(this.getPopTime());
+ return itemstack;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index a7dfad2696e7145af1355a5db132af14d09a6f30..b0421823684ff6b9474b81675742d2ee3b17edf7 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java