mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
28 lines
1.6 KiB
Diff
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 8aab412c8e70b6f9d8e05a26cefac330dd7a2ea1..ecec91d28d1b71d549f48185af5f1ef3286768be 100644
|
|
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -248,7 +248,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
|
|
}
|
|
}
|
|
|