9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-03 22:26:19 +00:00
Files
Leaf/leaf-archived-patches/unapplied/server/minecraft-patches/features/0032-Reduce-active-items-finding-hopper-nearby-check.patch
Dreeam 236010caba Cooking Tutorial
1. Wet the drys
2. Dry the wets
3. Wet the drys
4. Dry the wets
5. Wet the drys
6. Now dust the wets
2025-03-28 03:11:27 -04:00

28 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Mon, 15 Jan 2024 10:53:10 -0500
Subject: [PATCH] Reduce active items finding hopper nearby check
This patch add a toggle for active items checking MinecraftHopper nearby,
But still recommend to turn-off `checkForMinecartNearItemWhileActive`
Since `Reduce-hopper-item-checks.patch` will cause lag under massive dropped items
diff --git a/net/minecraft/world/entity/item/ItemEntity.java b/net/minecraft/world/entity/item/ItemEntity.java
index 6436afc0e59a8efdc9551fdde4d03d245548f3ef..280d9d5a23f5fc8560ca8eeb4f3652ea9c1505b2 100644
--- a/net/minecraft/world/entity/item/ItemEntity.java
+++ b/net/minecraft/world/entity/item/ItemEntity.java
@@ -241,7 +241,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
return; // Gale - EMC - reduce hopper item checks
}
- this.markNearbyHopperCartsAsImmune(); // Gale - EMC - reduce hopper item checks
+ // Leaf start - Reduce active items finding hopper nearby check
+ if (level().galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.minecart.temporaryImmunity.checkForMinecartNearItemWhileActive) {
+ this.markNearbyHopperCartsAsImmune(); // Gale - EMC - reduce hopper item checks
+ }
+ // Leaf end - Reduce active items finding hopper nearby check
}
}