Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Auto Farm #363

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
}
Loading