[PR #6762] [MERGED] Port map: the villager bone meal behaviour is ported, not missing #7080

Closed
opened 2026-11-03 06:33:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6762
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/ledger-bonemeal


📝 Commits (1)

  • 752aad9 Port map: the villager bone meal behaviour is ported

📊 Changes

1 file changed (+8 additions, -8 deletions)

View changed files

📝 tools/port_map/game-009.tsv (+8 -8)

📄 Description

Vanilla 26.3's UseBonemeal has a villager take bone meal from its inventory and grow a crop below its maximum age within the 3x3x3 around it, picked once every 10 ticks and again 40 ticks after each meal, for up to 80 work cycles inside the behaviour's 60-tick window, and VillagerGoalPackages.getWorkPackage puts it at priority 4 for a farmer (7 otherwise), after HarvestFarmland at 2 (5 otherwise).

Horizon ports all of that in crates/horizon-client/src/mobs/villager_brain.rs, but tools/port_map/game-009.tsv still listed the seven UseBonemeal methods as missing and said in the VillagerGoalPackages.getWorkPackage row that the entry never starts, so the map reported a farming behaviour that is in the tree as absent.

Proven:

  • git log -1 1b469a542 -> "Let villagers with bone meal grow crops", in upstream/main: the behaviour landed there.
  • grep -n "fn try_start\|fn tick_or_stop\|fn pick_bonemeal_crop\|fn bonemeal_valid\|fn bonemeal_target\|fn packages" crates/horizon-client/src/mobs/villager_brain.rs -> B::try_start at 1519, B::tick_or_stop at 2836, pick_bonemeal_crop at 3610, bonemeal_valid at 3605, bonemeal_target at 3630, packages at 4062.
  • sed -n 1766,1794p (the 10-tick and 160-tick gates, the bone meal count, the crop pick, the main-hand item, the work cycle time and the zeroed worked count), sed -n 3195,3240p (the 80-cycle and 60-tick stops, the meal leaving the inventory, the next cycle 40 ticks later) and sed -n 4130,4148p (if farmer { 4 } else { 7 }) read the same as the bytecode of /tmp/jp.sh net.minecraft.world.entity.ai.behavior.UseBonemeal and /tmp/jp.sh net.minecraft.world.entity.ai.behavior.VillagerGoalPackages (where the behaviour's own Behavior() duration is the default 60 ticks that Behavior.timedOut counts).
  • git diff --numstat -> 8 8 tools/port_map/game-009.tsv, no other file.

Not proven: this only corrects the map; no game code changes. I did not run tools/port_ledger.py map-check (it needs a full port_ledger.py build against the 26.3 jar, and the class-row complaints it prints for this file are older than this change), and I did not watch a farmer use bone meal in game. The in-game check would be: give a farmer bone meal on a farm of unripe wheat and watch the crop grow within a few seconds, then again about 40 ticks later.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6762 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/ledger-bonemeal` --- ### 📝 Commits (1) - [`752aad9`](https://github.com/horizon-rust/horizon/commit/752aad9385c99422ca02661187b5a07b9ff1102f) Port map: the villager bone meal behaviour is ported ### 📊 Changes **1 file changed** (+8 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game-009.tsv` (+8 -8) </details> ### 📄 Description Vanilla 26.3's `UseBonemeal` has a villager take bone meal from its inventory and grow a crop below its maximum age within the 3x3x3 around it, picked once every 10 ticks and again 40 ticks after each meal, for up to 80 work cycles inside the behaviour's 60-tick window, and `VillagerGoalPackages.getWorkPackage` puts it at priority 4 for a farmer (7 otherwise), after `HarvestFarmland` at 2 (5 otherwise). Horizon ports all of that in `crates/horizon-client/src/mobs/villager_brain.rs`, but `tools/port_map/game-009.tsv` still listed the seven `UseBonemeal` methods as `missing` and said in the `VillagerGoalPackages.getWorkPackage` row that the entry never starts, so the map reported a farming behaviour that is in the tree as absent. **Proven:** - `git log -1 1b469a542` -> "Let villagers with bone meal grow crops", in `upstream/main`: the behaviour landed there. - `grep -n "fn try_start\|fn tick_or_stop\|fn pick_bonemeal_crop\|fn bonemeal_valid\|fn bonemeal_target\|fn packages" crates/horizon-client/src/mobs/villager_brain.rs` -> `B::try_start` at 1519, `B::tick_or_stop` at 2836, `pick_bonemeal_crop` at 3610, `bonemeal_valid` at 3605, `bonemeal_target` at 3630, `packages` at 4062. - `sed -n 1766,1794p` (the 10-tick and 160-tick gates, the bone meal count, the crop pick, the main-hand item, the work cycle time and the zeroed worked count), `sed -n 3195,3240p` (the 80-cycle and 60-tick stops, the meal leaving the inventory, the next cycle 40 ticks later) and `sed -n 4130,4148p` (`if farmer { 4 } else { 7 }`) read the same as the bytecode of `/tmp/jp.sh net.minecraft.world.entity.ai.behavior.UseBonemeal` and `/tmp/jp.sh net.minecraft.world.entity.ai.behavior.VillagerGoalPackages` (where the behaviour's own `Behavior()` duration is the default 60 ticks that `Behavior.timedOut` counts). - `git diff --numstat` -> `8 8 tools/port_map/game-009.tsv`, no other file. **Not proven:** this only corrects the map; no game code changes. I did not run `tools/port_ledger.py map-check` (it needs a full `port_ledger.py build` against the 26.3 jar, and the class-row complaints it prints for this file are older than this change), and I did not watch a farmer use bone meal in game. The in-game check would be: give a farmer bone meal on a farm of unripe wheat and watch the crop grow within a few seconds, then again about 40 ticks later. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:33:28 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7080
No description provided.