Zombie Villager
Registry name
etfuturum.zombieVillager
Basic info
- Health: Inherited from
EntityZombie(standard zombie health) - Armor: Inherited from
EntityZombie - Size: Inherited from
EntityZombie(standard zombie size) - Spawn conditions: Same as zombie (light ≤ 7), but also when a villager is killed by a zombie (conversion)
- Drops: Same as zombie (rotten flesh, equipment, etc.)
- Behaviour: Villager-variant zombie. Can be cured with a golden apple + potion of weakness. Converts back to
EntityVillageron cure.
Key features
| Feature | Details |
|---|---|
| Profession | Random 0–5 (determined at spawn, stored in data watcher id 15) |
| Conversion cure | Golden apple + weakness potion → convertToVillager() |
| Child state | Locked to false (always adult) |
| Villager flag | isVillager() returns true |
Conversion (convertToVillager)
Called by player using golden apple on weakness-affected zombie:
- Creates new
EntityVillagerat same position - Copies location and angles
- Sets villager profession to the stored type (0–5)
- Applies
confusionpotion (200 ticks) to the new villager - Removes zombie, spawns villager
- Plays villager cure sound (1017)
NBT data
"VillagerType": integer 0–5 (profession)- Stored in data watcher id 15 (int)
AI tasks
Inherited from EntityZombie:
- Melee attack player
- Melee attack villager
- Move through village
- Wander, watch, look idle
- Target: hurt-by-target → player → villager
Notes
- Extends
EntityZombiedirectly setChild(boolean)overridden as no-op — zombie villagers are always adultisChild()always returnsfalse- Spawn egg: uses
ModEntityList.getEggFromEntity(returns zombie villager egg) onSpawnWithEgg: sets random profession type 0–5- Sound IDs:
minecraft:entity.zombie_villager.ambient,.hurt,.death,.step