From 0b6146a64c91d07b49f7c084b083b9d9c461e8da Mon Sep 17 00:00:00 2001 From: brandyn Date: Sat, 8 Aug 2026 05:09:01 +0100 Subject: [PATCH] Config for Luggage vacuuming items --- src/main/java/openblocks/Config.java | 7 +++++++ .../openblocks/common/entity/ai/EntityAICollectItem.java | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/openblocks/Config.java b/src/main/java/openblocks/Config.java index e9e2e0a8b..ab7b220b0 100644 --- a/src/main/java/openblocks/Config.java +++ b/src/main/java/openblocks/Config.java @@ -49,6 +49,13 @@ public class Config { + @OnLineModifiable + @ConfigProperty( + category = "luggage", + name = "collectItems", + comment = "Should luggage collect nearby dropped items") + public static boolean luggageCollectItems = true; + @OnLineModifiable @ConfigProperty(category = "dropblock", name = "searchDistance", comment = "The range of the drop block") public static int elevatorTravelDistance = 20; diff --git a/src/main/java/openblocks/common/entity/ai/EntityAICollectItem.java b/src/main/java/openblocks/common/entity/ai/EntityAICollectItem.java index 9fc31b84c..d27763efe 100644 --- a/src/main/java/openblocks/common/entity/ai/EntityAICollectItem.java +++ b/src/main/java/openblocks/common/entity/ai/EntityAICollectItem.java @@ -9,6 +9,7 @@ import net.minecraft.pathfinding.PathNavigate; import net.minecraft.util.AxisAlignedBB; +import openblocks.Config; import openblocks.common.entity.EntityLuggage; import openmods.inventory.legacy.ItemDistribution; @@ -28,6 +29,7 @@ public EntityAICollectItem(EntityLuggage luggage) { @Override public boolean shouldExecute() { + if (!Config.luggageCollectItems) return false; if (!pathFinder.noPath()) { return false; } @@ -70,7 +72,7 @@ public void resetTask() { @Override public boolean continueExecuting() { - return luggage.isEntityAlive() && !pathFinder.noPath() && !targetItem.isDead; + return Config.luggageCollectItems && luggage.isEntityAlive() && !pathFinder.noPath() && !targetItem.isDead; } @Override