mirror of https://github.com/cabaletta/baritone
Add bamboo to `FarmProcess` targets
This commit is contained in:
parent
92bc067633
commit
52aa609ac7
|
@ -42,6 +42,7 @@ import net.minecraft.world.item.ItemStack;
|
|||
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;
|
||||
|
@ -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()
|
||||
);
|
||||
|
||||
|
@ -137,6 +139,15 @@ public final class FarmProcess extends BaritoneProcessHelper implements IFarmPro
|
|||
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) {
|
||||
|
|
Loading…
Reference in New Issue