[PR #2193] [MERGED] Water buckets pick up fish and tadpoles, keeping their data #4090

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2193
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/fish-buckets


📝 Commits (1)

  • c7bacfb Water buckets pick up fish and tadpoles, keeping their data

📊 Changes

2 files changed (+117 additions, -13 deletions)

View changed files

📝 crates/horizon-client/src/entity_nbt.rs (+88 -5)
📝 crates/horizon-client/src/game/creatures.rs (+29 -8)

📄 Description

What and why

A water bucket on a cod, salmon, pufferfish, tropical fish or tadpole did nothing; only axolotls could be scooped up. Now each of them is picked up the way vanilla does it: the fill sound plays, the player gets the matching bucket (cod_bucket, salmon_bucket, pufferfish_bucket, tropical_fish_bucket, tadpole_bucket), and the mob is removed. A lead on the mob falls as an item (only axolotls can be leashed, and before this the lead was lost).

The bucket carries what vanilla puts on it, and placing the bucket reads it back, so the mob comes out the same:

  • every bucket: custom name, Health, and the NoAI, Silent, NoGravity, Glowing, Invulnerable and PersistenceRequired flags when set;
  • tropical fish: the tropical_fish/pattern, base_color and pattern_color components;
  • salmon: the salmon/size component;
  • axolotl and tadpole: Age and AgeLocked (they were written for every mob before; fish do not carry them in vanilla).

A pufferfish bucket does not remember the puff state, because vanilla does not save it either.

Vanilla reference

  • Bucketable.bucketMobPickup: a water bucket on a live mob plays getPickupSound, takes getBucketItemStack, runs saveToBucketTag, swaps the held bucket through ItemUtils.createFilledResult, fires the filled_bucket trigger, drops the lead and discards the mob.
  • AbstractFish.mobInteract and Tadpole.mobInteract (after its food and golden dandelion checks) use it. Sounds: BUCKET_FILL_FISH, BUCKET_FILL_TADPOLE, BUCKET_FILL_AXOLOTL.
  • Bucketable.saveDefaultDataToBucketTag, TropicalFish.saveToBucketTag, Salmon.saveToBucketTag, Tadpole.saveToBucketTag, Axolotl.saveToBucketTag.
  • Leashable.dropLeash: the lead is dropped as an item.

Self-check

cargo check -p horizon-client passes.


🔄 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/2193 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/fish-buckets` --- ### 📝 Commits (1) - [`c7bacfb`](https://github.com/horizon-rust/horizon/commit/c7bacfb2933ace0c7394feceb8947d36f2e37e18) Water buckets pick up fish and tadpoles, keeping their data ### 📊 Changes **2 files changed** (+117 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entity_nbt.rs` (+88 -5) 📝 `crates/horizon-client/src/game/creatures.rs` (+29 -8) </details> ### 📄 Description ## What and why A water bucket on a cod, salmon, pufferfish, tropical fish or tadpole did nothing; only axolotls could be scooped up. Now each of them is picked up the way vanilla does it: the fill sound plays, the player gets the matching bucket (`cod_bucket`, `salmon_bucket`, `pufferfish_bucket`, `tropical_fish_bucket`, `tadpole_bucket`), and the mob is removed. A lead on the mob falls as an item (only axolotls can be leashed, and before this the lead was lost). The bucket carries what vanilla puts on it, and placing the bucket reads it back, so the mob comes out the same: - every bucket: custom name, `Health`, and the `NoAI`, `Silent`, `NoGravity`, `Glowing`, `Invulnerable` and `PersistenceRequired` flags when set; - tropical fish: the `tropical_fish/pattern`, `base_color` and `pattern_color` components; - salmon: the `salmon/size` component; - axolotl and tadpole: `Age` and `AgeLocked` (they were written for every mob before; fish do not carry them in vanilla). A pufferfish bucket does not remember the puff state, because vanilla does not save it either. ## Vanilla reference - `Bucketable.bucketMobPickup`: a water bucket on a live mob plays `getPickupSound`, takes `getBucketItemStack`, runs `saveToBucketTag`, swaps the held bucket through `ItemUtils.createFilledResult`, fires the `filled_bucket` trigger, drops the lead and discards the mob. - `AbstractFish.mobInteract` and `Tadpole.mobInteract` (after its food and golden dandelion checks) use it. Sounds: `BUCKET_FILL_FISH`, `BUCKET_FILL_TADPOLE`, `BUCKET_FILL_AXOLOTL`. - `Bucketable.saveDefaultDataToBucketTag`, `TropicalFish.saveToBucketTag`, `Salmon.saveToBucketTag`, `Tadpole.saveToBucketTag`, `Axolotl.saveToBucketTag`. - `Leashable.dropLeash`: the lead is dropped as an item. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:37 +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#4090
No description provided.