Skip to content

Commit

Permalink
Add bamboo to FarmProcess targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSharp committed Jul 14, 2024
1 parent 92bc067 commit 52aa609
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/baritone/process/FarmProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import net.minecraft.world.item.Items;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.AirBlock;
import net.minecraft.world.level.block.BambooStalkBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BonemealableBlock;
Expand Down Expand Up @@ -95,6 +96,7 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
Items.NETHER_WART,
Items.COCOA_BEANS,
Blocks.SUGAR_CANE.asItem(),
Blocks.BAMBOO.asItem(),
Blocks.CACTUS.asItem()
);

Expand Down Expand Up @@ -137,6 +139,15 @@ public boolean readyToHarvest(Level world, BlockPos pos, BlockState state) {
return true;
}
},
BAMBOO(Blocks.BAMBOO, null) {
@Override
public boolean readyToHarvest(Level world, BlockPos pos, BlockState state) {
if (Baritone.settings().replantCrops.value) {
return world.getBlockState(pos.below()).getBlock() instanceof BambooStalkBlock;
}
return true;
}
},
CACTUS(Blocks.CACTUS, null) {
@Override
public boolean readyToHarvest(Level world, BlockPos pos, BlockState state) {
Expand Down

0 comments on commit 52aa609

Please sign in to comment.