跳到正文
烈焰甘蔗Wiki

Husk

Registry name

etfuturum:husk

Audit correction: previously written as etfuturum.husk (wrong separator). Evidence: core/proxy/CommonProxy.java:206 registerEntity(EntityHusk.class, "husk", 4, ...)

Basic info

  • Health: Inherited from EntityZombie — standard zombie health (20 HP base)

  • Armor: Inherited from EntityZombie

  • Size: 0.6 × 1.8 (width × height)

  • Spawn conditions: No natural spawn is registered by default. The husk is registered as an entity, but EntityRegistry.addSpawn(EntityHusk.class, ...) sits inside an if (ConfigWorld.oldHuskSpawning) block, and oldHuskSpawning defaults to false (configuration/configs/ConfigWorld.java:202). With the default config the husk therefore never spawns naturally at all — it is obtainable only via spawn egg / commands.

    When oldHuskSpawning = true, the logic is: in biomes that are simultaneously SANDY + DRY + HOT (deserts), vanilla zombie spawn is removed and replaced by EntityZombie weight 20 + EntityHusk weight 80, both group 4–4 — i.e. husks are 80% of zombie spawns, and they spawn regardless of sky exposure. Evidence: core/proxy/CommonProxy.java:209-219.

    Audit correction: the previous text said “desert biomes; standard zombie spawn rules (light level ≤ 7, etc.)” — that described neither the 80:20 weight split nor the fact that the whole thing is off by default. The config’s own description (ConfigWorld.java:202) states the default behaviour is “replacing 80% of zombies exposed to the sky in the right biomes”.

Configuration gate

  • Entity registration: ConfigEntities.enableHusk, key enableHusks, default ON (ConfigEntities.java:59).
  • Natural spawning: ConfigWorld.oldHuskSpawning, default OFF (ConfigWorld.java:202) → no natural husks by default. Forced ON when OptiFine is detected (CommonProxy.java:196-199).
  • Drops: Inherited from EntityZombie (rotten flesh, rarely iron ingot/ingots with Looting)
  • Behaviour: Desert variant of zombie. Same AI as zombie with two key differences: ignores sunlight (never burns), and deals Hunger effect on hit.

Key differences from Zombie

Feature Husk Zombie
Sunlight Ignores it (always brightness=0) Burns in sunlight
Effect on hit Hunger (140 × difficulty ticks) None
Drops Same as zombie Same

AI tasks

  1. Swimming
  2. Melee attack player
  3. Melee attack villager
  4. Move toward restriction
  5. Move through village
  6. Wander
  7. Watch closest player
  8. Look idle
  9. Target: hurt-by-target
  10. Target: nearest attackable player
  11. Target: nearest attackable villager

Notes

  • Extends EntityZombie directly; all zombie mechanics (spawning, equipment, attributes) apply
  • onLivingUpdate: sets ignoreSunlight=true → calls super.onLivingUpdate() → resets, forcing brightness to 0 during the update tick
  • Sound IDs: minecraft:entity.husk.ambient, .hurt, .death, .step
  • Spawn egg returns the standard zombie spawn egg via ModEntityList.getEggFromEntity
浏览全部模组