Make target selection slightly random
build / build (push) Successful in 2m46s

This commit is contained in:
Dynamitos
2025-10-29 16:38:52 +01:00
parent 0b87d27579
commit 707e730013
@@ -58,9 +58,12 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
// if block is farmland // if block is farmland
if (blockState.isOf(Blocks.FARMLAND) && world.isAir(pos.up())) { if (blockState.isOf(Blocks.FARMLAND) && world.isAir(pos.up())) {
Copperfarmers.LOGGER.debug("Found farmland at " + pos); Copperfarmers.LOGGER.debug("Found farmland at " + pos);
callbackInfo if (Math.random() < 0.5) {
.setReturnValue(Optional.of(new MoveItemsTask.Storage(pos, null, null, blockState))); callbackInfo
return; .setReturnValue(
Optional.of(new MoveItemsTask.Storage(pos, null, null, blockState)));
return;
}
} }
} }
} }