mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2026-01-06 15:51:31 +00:00
ClassInstanceMultiMap belongs to Minecraft vanilla entity storage. And is unused, since replaced by spottedleaf's entity storage (rewrite chunk system). However these patches might be useful for vanilla entity storage if is used.
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 605de72224f6baa112dbfd2c83fd7a1ceba6a540..52314a8fe4188689431f9a1261226859b967f5f1 100644
|
|
--- a/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -246,7 +246,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
|
|
}
|
|
}
|
|
|