commit
e7412d0d46
@ -657,7 +657,12 @@ public final class Settings {
|
||||
public final Setting<Integer> exploreMaintainY = new Setting<>(64);
|
||||
|
||||
/**
|
||||
* Replant nether wart while farming
|
||||
* Replant normal Crops while farming and leave cactus and sugarcane to regrow
|
||||
*/
|
||||
public final Setting<Boolean> replantCrops = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Replant nether wart while farming. This setting only has an effect when replantCrops is also enabled
|
||||
*/
|
||||
public final Setting<Boolean> replantNetherWart = new Setting<>(false);
|
||||
|
||||
|
@ -112,13 +112,19 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
||||
SUGARCANE(Blocks.REEDS, null) {
|
||||
@Override
|
||||
public boolean readyToHarvest(World world, BlockPos pos, IBlockState state) {
|
||||
return world.getBlockState(pos.down()).getBlock() instanceof BlockReed;
|
||||
if (Baritone.settings().replantCrops.value) {
|
||||
return world.getBlockState(pos.down()).getBlock() instanceof BlockReed;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
CACTUS(Blocks.CACTUS, null) {
|
||||
@Override
|
||||
public boolean readyToHarvest(World world, BlockPos pos, IBlockState state) {
|
||||
return world.getBlockState(pos.down()).getBlock() instanceof BlockCactus;
|
||||
if (Baritone.settings().replantCrops.value) {
|
||||
return world.getBlockState(pos.down()).getBlock() instanceof BlockCactus;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
public final Block block;
|
||||
@ -166,10 +172,13 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
||||
for (Harvest harvest : Harvest.values()) {
|
||||
scan.add(harvest.block);
|
||||
}
|
||||
scan.add(Blocks.FARMLAND);
|
||||
if (Baritone.settings().replantNetherWart.value) {
|
||||
scan.add(Blocks.SOUL_SAND);
|
||||
if (Baritone.settings().replantCrops.value) {
|
||||
scan.add(Blocks.FARMLAND);
|
||||
if (Baritone.settings().replantNetherWart.value) {
|
||||
scan.add(Blocks.SOUL_SAND);
|
||||
}
|
||||
}
|
||||
|
||||
if (Baritone.settings().mineGoalUpdateInterval.value != 0 && tickCount++ % Baritone.settings().mineGoalUpdateInterval.value == 0) {
|
||||
Baritone.getExecutor().execute(() -> locations = WorldScanner.INSTANCE.scanChunkRadius(ctx, scan, 256, 10, 10));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user