This commit is contained in:
1 parent
0b87d27579
commit
707e730013
1 file changed
+4
-1
@@ -58,14 +58,17 @@ public abstract class MoveItemsTaskMixin extends MultiTickTask<PathAwareEntity>
|
||||
// if block is farmland
|
||||
if (blockState.isOf(Blocks.FARMLAND) && world.isAir(pos.up())) {
|
||||
Copperfarmers.LOGGER.debug("Found farmland at " + pos);
|
||||
if (Math.random() < 0.5) {
|
||||
callbackInfo
|
||||
.setReturnValue(Optional.of(new MoveItemsTask.Storage(pos, null, null, blockState)));
|
||||
.setReturnValue(
|
||||
Optional.of(new MoveItemsTask.Storage(pos, null, null, blockState)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "testContainer", at = @At("HEAD"), cancellable = true)
|
||||
private void testContainer(PathAwareEntity entity, BlockState state, CallbackInfoReturnable<Boolean> callbackInfo) {
|
||||
|
||||
Reference in new issue
Block a user