跳到正文
烈焰甘蔗Wiki

Stray

Registry name

etfuturum:stray

Audit correction: previously written as etfuturum.stray (wrong separator). Evidence: core/proxy/CommonProxy.java:224 registerEntity(EntityStray.class, "stray", 5, ...)

Basic info

  • Health: Inherited from EntitySkeleton (standard skeleton health: ~20 HP)

  • Armor: Inherited from EntitySkeleton

  • Size: Inherited from EntitySkeleton (standard)

  • Spawn conditions: No natural spawn is registered by default. EntityRegistry.addSpawn(EntityStray.class, ...) sits inside an if (ConfigWorld.oldStraySpawning) block and that flag defaults to false (configuration/configs/ConfigWorld.java:203), so with default settings strays never spawn naturally — spawn egg / commands only.

    When oldStraySpawning = true: in all BiomeDictionary.Type.SNOWY biomes vanilla skeleton spawn is removed and replaced by EntitySkeleton weight 20 + EntityStray weight 80, both group 4–4 — strays are 80% of skeleton spawns in snowy biomes. Evidence: core/proxy/CommonProxy.java:225-231.

    Audit correction: the previous text said “cold/snowy biomes; same spawn rules as skeleton” — it omitted both the 80:20 weight split and the default-off state.

Configuration gate

  • Entity registration: ConfigEntities.enableStray, key enableStrays, default ON (ConfigEntities.java:60).
  • Natural spawning: ConfigWorld.oldStraySpawning, default OFF (ConfigWorld.java:203) → no natural strays by default. Forced ON when OptiFine is detected (CommonProxy.java:200-203).
  • Drops:
    • Arrows: 0–3 (+ fortune)
    • Bones: 0–3 (+ fortune)
    • Bow (always equipped)
  • Behaviour: Skeleton variant with Slowness箭. Overrides ranged attack to fire EntityTippedArrow with Slowness effect instead of normal arrows.

Key differences from Skeleton

Feature Stray Skeleton
Arrow type EntityTippedArrow (Slowness) Normal EntityArrow
On hit (melee) Applies Slowness (140 × difficulty ticks) Nothing
Ambient sound minecraft:entity.stray.ambient minecraft:entity.skeleton.ambient
Step sound minecraft:entity.stray.step minecraft:entity.skeleton.step
Halloween costume Can wear pumpkin Same

Ranged attack

  • Uses EntityTippedArrow shot from bow
  • Arrow carries Slowness potion effect
  • Arrow damage: baseDamage × 2 + random_gaussian + difficulty × 0.11
  • Enchantments (Power, Punch, Flame) apply normally
  • Arrow entity uses ModItems.TIPPED_ARROW NBT for the potion data

AI tasks

  1. Swimming
  2. Restrict sun (stays in shade)
  3. Flee sun
  4. Wander
  5. Watch closest player
  6. Look idle
  7. Arrow attack (task 4, added at spawn via onSpawnWithEgg)
  8. Target: hurt-by-target
  9. Target: nearest player

Notes

  • Extends EntitySkeleton — inherits full skeleton attributes, AI, equipment, etc.
  • setCombatTask() called on init: swaps AI to use EntityAIArrowAttack
  • Spawn egg returns skeleton egg via ModEntityList.getEggFromEntity
  • addRandomArmor() calls super then forces bow in main hand
  • dropFewItems override: arrows + bones only (no bow drop)
浏览全部模组