Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.
Rust differential-testinggame-enginegamedevlinuxminecraftminecraft-javareimplementationrustvoxelvulkanwgpu
Name Bukkit's PlayerFishEvent as native_player_fish's model
Ludovic Marie1929509dddfe
diff --git a/crates/horizon-client/src/game/native_hooks.rs b/crates/horizon-client/src/game/native_hooks.rsindex 2f189a934..7e1694694 100644--- a/crates/horizon-client/src/game/native_hooks.rs+++ b/crates/horizon-client/src/game/native_hooks.rs@@ -2729,8 +2729,8 @@ impl Game<'_> {/// (`FishingRodItem.use` throwing the bobber), 1 a fish biting/// (`FishingHook.catchingFish`), 2 the reel-in of a bite, which gives the/// catch, 3 the reel-in with nothing on the line, 4 the reel-in of a- /// bobber hooked to an entity or item (like NeoForge's `ItemFishedEvent`- /// and Bukkit's `PlayerFishEvent`). Set `cancel` on the cast and nothing+ /// bobber hooked to an entity or item (like Bukkit's `PlayerFishEvent`;+ /// NeoForge's `ItemFishedEvent` is later, in `FishingHook.retrieve`). Set `cancel` on the cast and nothing/// is thrown; on a bite the fish gets away and the wait starts over; on/// a reel-in (2 to 4) nothing happens, the bobber stays out and the rod/// takes no wear. The bobber ending by itself (too far, the rod putdiff --git a/tools/native-hook-fragments/native_player_fish.json b/tools/native-hook-fragments/native_player_fish.jsonindex 5a9099866..67644d2b6 100644--- a/tools/native-hook-fragments/native_player_fish.json+++ b/tools/native-hook-fragments/native_player_fish.json@@ -3,10 +3,10 @@{"name": "player_fish","target": "horizon_client::game::native_hooks::Game<'_>::native_player_fish",- "neoforge": "ItemFishedEvent",+ "neoforge": "none (NeoForge's ItemFishedEvent fires after the loot roll, in FishingHook.retrieve; Bukkit's PlayerFishEvent)","side": "server"}],"rust_summary": "a player's fishing rod: cast, bite, catch, reel-in, cancellable (`native_player_fish`).",- "doc_summary": "a player's fishing rod: `native_player_fish(player, name, state, cancel)` is heard for the cast (`state` 0), a fish biting (1), the reel-in with a catch (2), the reel-in with nothing on the line (3) and the reel-in of a bobber hooked to an entity or item (4), for a player of a server (NeoForge's `ItemFishedEvent`, Bukkit's `PlayerFishEvent`). A mod sets `cancel` to stop a cast, make the fish get away, or leave the bobber out on a reel-in. The player's state is swapped in. Bundles that use it need `\"hooks\": @API:native_player_fish@`."+ "doc_summary": "a player's fishing rod: `native_player_fish(player, name, state, cancel)` is heard for the cast (`state` 0), a fish biting (1), the reel-in with a catch (2), the reel-in with nothing on the line (3) and the reel-in of a bobber hooked to an entity or item (4), for a player of a server (Bukkit's `PlayerFishEvent`; NeoForge's `ItemFishedEvent` fires later, once the loot is rolled). A mod sets `cancel` to stop a cast, make the fish get away, or leave the bobber out on a reel-in. The player's state is swapped in. Bundles that use it need `\"hooks\": @API:native_player_fish@`."}