mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-21 16:09:19 +00:00
Upstream has released updates that appear to apply and compile correctly Gale Changes: Dreeam-qwq/Gale@1e0ebad Clean up Dreeam-qwq/Gale@9ce20fa throw MissingPaletteEntryException for null entries in hash palette Dreeam-qwq/Gale@751637d Final clean up imports
43 lines
2.8 KiB
Diff
43 lines
2.8 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 items finding hopper nearby check
|
|
|
|
This patch add a toggle for 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/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
index a5b392364c2dfceafbee4523699431381db7e7f9..af0f7ce6efa799e6f5ea6d34250d462f51b1c4e3 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
|
@@ -241,7 +241,9 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
|
this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
|
return; // Gale - EMC - reduce hopper item checks
|
|
}
|
|
- this.markNearbyHopperCartsAsImmune(); // Gale - EMC - reduce hopper item checks
|
|
+ if (level().galeConfig().smallOptimizations.reducedIntervals.checkNearbyItem.hopper.minecart.temporaryImmunity.checkForMinecartNearItemWhileActive) { // Leaf - Reduce items finding hopper nearby check
|
|
+ this.markNearbyHopperCartsAsImmune(); // Gale - EMC - reduce hopper item checks
|
|
+ }
|
|
|
|
}
|
|
}
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 9df60b85bb47d25f375132b775163befb36987f7..af052b2d746ccb28ffff386c63fd839b2fb4df62 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -75,10 +75,11 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
|
|
public TemporaryImmunity temporaryImmunity;
|
|
public class TemporaryImmunity extends ConfigurationPart {
|
|
+ public boolean checkForMinecartNearItemWhileActive = false; // Leaf - Make it configurable and reorder code
|
|
+ public boolean checkForMinecartNearItemWhileInactive = true;
|
|
public int duration = 100;
|
|
public int nearbyItemMaxAge = 1200;
|
|
public int checkForMinecartNearItemInterval = 20;
|
|
- public boolean checkForMinecartNearItemWhileInactive = true;
|
|
public double maxItemHorizontalDistance = 24.0;
|
|
public double maxItemVerticalDistance = 4.0;
|
|
}
|