[PR #4585] [MERGED] Port map: the frog and goat long jump rows point at frog.rs (ported in #3946) #5711

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4585
Author: @xFedeT
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/frog-preferred-jump


📝 Commits (1)

  • 8dff503 Port map: the frog and goat long jump rows point at frog.rs (ported in #3946)

📊 Changes

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

View changed files

📝 tools/port_map/game-008.tsv (+12 -12)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally.

Refs #3521 (row LongJumpToPreferredBlock.start)

What

The row is wrong: frogs and goats have long jumped since #3946, including the frog's preference for lily pads and big dripleaf. The port map (tools/port_map/game-008.tsv, rows 22 to 33) still listed the whole LongJump* family as missing, which is where the row came from. This PR only corrects the map: the 12 rows now point at crates/horizon-client/src/mobs/frog.rs (LongJump::{start, candidate, draw, pick, can_use, can_continue, tick, end}, acceptable_landing, default_acceptable_landing, optimal_jump_vector). No game code changes.

How I checked

I read LongJumpToPreferredBlock.java and compared it with LongJump in frog.rs:

Vanilla Horizon
start: super.start, clear notPrefferedJumpCandidates, currentlyWantingPreferredOnes = random.nextFloat() < 0.5 LongJump::start: the candidate lists are cleared by ..Self::default(), wanting_preferred = m.random.next_float() < PREFERRED_BLOCKS_CHANCE (0.5), drawn only for frogs (a goat's activity is a plain LongJumpToRandomPos)
getJumpCandidate: if not wanting, the plain weighted pick candidate: if !self.wanting_preferred { return self.draw(lr) }
while candidates remain: draw one; if the block below its target is in the preferred tag return it, else keep it in the not preferred list same loop, tag minecraft:frog_prefer_jump_to on y - 1
nothing preferred: the first not preferred one (remove(0)) (!self.not_preferred.is_empty()).then(|| self.not_preferred.remove(0))

The unit tests for the weighted draw, the candidate box order and the cooldown (mobs::frog::tests) pass. There is no tick-for-tick check: frogs run on goals standing in for FrogAi's brain and the mob_ai probe has no frog brain (a frog scenario diverges at tick 0).

A map change has no in-game effect, so there is no screenshot.

🤖 Generated with Claude Code


🔄 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/4585 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/frog-preferred-jump` --- ### 📝 Commits (1) - [`8dff503`](https://github.com/horizon-rust/horizon/commit/8dff50318a9c88f4b9da6aed7135828cf04d4db0) Port map: the frog and goat long jump rows point at frog.rs (ported in #3946) ### 📊 Changes **1 file changed** (+12 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game-008.tsv` (+12 -12) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Sonnet 5.5), not by xFedeT personally. Refs #3521 (row `LongJumpToPreferredBlock.start`) ## What The row is wrong: frogs and goats have long jumped since #3946, including the frog's preference for lily pads and big dripleaf. The port map (`tools/port_map/game-008.tsv`, rows 22 to 33) still listed the whole `LongJump*` family as `missing`, which is where the row came from. This PR only corrects the map: the 12 rows now point at `crates/horizon-client/src/mobs/frog.rs` (`LongJump::{start, candidate, draw, pick, can_use, can_continue, tick, end}`, `acceptable_landing`, `default_acceptable_landing`, `optimal_jump_vector`). No game code changes. ## How I checked I read `LongJumpToPreferredBlock.java` and compared it with `LongJump` in `frog.rs`: | Vanilla | Horizon | |---|---| | `start`: `super.start`, clear `notPrefferedJumpCandidates`, `currentlyWantingPreferredOnes = random.nextFloat() < 0.5` | `LongJump::start`: the candidate lists are cleared by `..Self::default()`, `wanting_preferred = m.random.next_float() < PREFERRED_BLOCKS_CHANCE` (0.5), drawn only for frogs (a goat's activity is a plain `LongJumpToRandomPos`) | | `getJumpCandidate`: if not wanting, the plain weighted pick | `candidate`: `if !self.wanting_preferred { return self.draw(lr) }` | | while candidates remain: draw one; if the block below its target is in the preferred tag return it, else keep it in the not preferred list | same loop, tag `minecraft:frog_prefer_jump_to` on `y - 1` | | nothing preferred: the first not preferred one (`remove(0)`) | `(!self.not_preferred.is_empty()).then(\|\| self.not_preferred.remove(0))` | The unit tests for the weighted draw, the candidate box order and the cooldown (`mobs::frog::tests`) pass. There is no tick-for-tick check: frogs run on goals standing in for `FrogAi`'s brain and the `mob_ai` probe has no frog brain (a frog scenario diverges at tick 0). A map change has no in-game effect, so there is no screenshot. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14: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#5711
No description provided.