Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/main/java/openblocks/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -28,6 +29,7 @@ public EntityAICollectItem(EntityLuggage luggage) {

@Override
public boolean shouldExecute() {
if (!Config.luggageCollectItems) return false;
if (!pathFinder.noPath()) {
return false;
}
Expand Down Expand Up @@ -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
Expand Down
Loading