villagers: a torchflower crop is never ripe

TorchflowerCropBlock.getMaxAge is 2 while its age property stops at 1, so
CropBlock.isMaxAge never holds for it: HarvestFarmland leaves it alone and
UseBonemeal keeps it as a target until it turns into a torchflower.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Ludovic MarieandClaude Opus 5.5 committed 2026-10-27 23:06:19 +01:00
1 parent 6e26990ad3
commit efa8df83b3
1 file changed
+2 -1
+2 -1
View File
@@ -330,7 +330,8 @@ pub fn ripe_crop(w: &MobWorld, p: [i32; 3]) -> bool {
let max = match w.block_name(p[0], p[1], p[2]) {
"minecraft:wheat" | "minecraft:carrots" | "minecraft:potatoes" => "7",
"minecraft:beetroots" => "3",
"minecraft:torchflower_crop" => "1",
// TorchflowerCropBlock.getMaxAge is 2, past its age property (0-1):
// the crop is never at max age (age 2 is the torchflower itself).
_ => return false,
};
w.prop(p[0], p[1], p[2], "age") == Some(max)