Let tadpoles be fed slime balls to grow up faster

This commit is contained in:
Kacpherek
2026-10-26 15:12:57 +01:00
parent 8027cb4176
commit 00e2cfec29
3 changed files with 19 additions and 3 deletions
@@ -2797,6 +2797,19 @@ impl Game<'_> {
self.trigger_entity("minecraft:tame_animal", "entity", &view);
}
}
// Tadpole.feed: frog food ages it by a tenth of the time left to
// grow into a frog (it grows on its next tick once past 24000).
Species::Tadpole if is_food && !m.extra.age_locked => {
consume = true;
let left = 24_000 - m.extra.age;
m.extra.age += ((left / 20) as f32 * 0.1) as i32 * 20;
// One happy villager particle at rest about the body.
self.particles_around_mob(
self.mobs[index].id,
"happy_villager",
horizon_client::particles::Burst::HORSE_EATING,
);
}
// HappyGhast.canFallInLove: never, so only a ghastling takes food.
_ if is_food
&& m.kind.flags.animal
@@ -66,8 +66,11 @@ impl Game<'_> {
| Species::Salmon
| Species::TropicalFish
| Species::Pufferfish
| Species::Axolotl
| Species::Tadpole => item == "minecraft:water_bucket",
| Species::Axolotl => item == "minecraft:water_bucket",
// Tadpole.mobInteract: frog food, else the bucket.
Species::Tadpole => {
item == "minecraft:water_bucket" || m.kind.food.iter().any(|f| f.as_str() == item)
}
Species::Armadillo => item == "minecraft:brush",
// ZombieVillager.mobInteract: CONSUME for a golden apple.
Species::ZombieVillager => item == "minecraft:golden_apple",
+1 -1
View File
@@ -1581,7 +1581,7 @@ impl Def {
S::Bee => "bee_food",
S::Turtle => "turtle_food",
S::Armadillo => "armadillo_food",
S::Frog => "frog_food",
S::Frog | S::Tadpole => "frog_food",
S::Axolotl => "axolotl_food",
S::Hoglin => "hoglin_food",
S::Strider => "strider_food",