Skip to content

Commit

Permalink
Update Auto Farm (#363)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazymoose77756 authored Jul 1, 2024
1 parent 83d4ea0 commit 164b6a1
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/main/java/anticope/rejects/modules/AutoFarm.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ private void onBreakBlock(BreakBlockEvent event) {
else if (block == Blocks.POTATOES) item = Items.POTATO;
else if (block == Blocks.BEETROOTS) item = Items.BEETROOT_SEEDS;
else if (block == Blocks.NETHER_WART) item = Items.NETHER_WART;
else if (block == Blocks.PITCHER_CROP) item = Items.PITCHER_POD;
else if (block == Blocks.TORCHFLOWER) item = Items.TORCHFLOWER_SEEDS;
if (item != null) replantMap.put(event.blockPos, item);
}
}
Expand Down Expand Up @@ -264,6 +266,8 @@ private boolean isMature(BlockState state, Block block) {
return state.get(sweetBerryBushBlock.AGE) >= 2;
} else if (block instanceof NetherWartBlock netherWartBlock) {
return state.get(netherWartBlock.AGE) >= 3;
} else if (block instanceof PitcherCropBlock pitcherCropBlock) {
return state.get(pitcherCropBlock.AGE) >= 4;
}
return true;
}
Expand All @@ -275,7 +279,9 @@ private boolean bonemealFilter(Block block) {
block instanceof AzaleaBlock ||
block instanceof SaplingBlock ||
block == Blocks.COCOA ||
block == Blocks.SWEET_BERRY_BUSH;
block == Blocks.SWEET_BERRY_BUSH ||
block == Blocks.PITCHER_CROP ||
block == Blocks.TORCHFLOWER;
}

private boolean harvestFilter(Block block) {
Expand All @@ -284,7 +290,9 @@ private boolean harvestFilter(Block block) {
block == Blocks.MELON ||
block == Blocks.NETHER_WART ||
block == Blocks.SWEET_BERRY_BUSH ||
block == Blocks.COCOA;
block == Blocks.COCOA ||
block == Blocks.PITCHER_CROP ||
block == Blocks.TORCHFLOWER;
}

private boolean plantFilter(Item item) {
Expand All @@ -294,6 +302,8 @@ private boolean plantFilter(Item item) {
item == Items.BEETROOT_SEEDS ||
item == Items.PUMPKIN_SEEDS ||
item == Items.MELON_SEEDS ||
item == Items.NETHER_WART;
item == Items.NETHER_WART ||
item == Items.PITCHER_POD ||
item == Items.TORCHFLOWER_SEEDS;
}
}

0 comments on commit 164b6a1

Please sign in to comment.