Fox
Registry name
etfuturum.fox
Basic info
- Health: 10 HP
- Armor: None
- Size:
0.6 × 0.7(width × height) - Spawn conditions: Natural spawning via Minecraft’s biome system; type determined by biome (
snowin snowy biomes,redelsewhere) - Drops: On death: drops whatever item it is holding in its mouth (if any). Default death drops follow
EntityAnimal(nothing by default unlessdropFewItemsoverridden — it is not in this class). - Behaviour: Passive/tameable four-legged mob. Complex AI for hunting, sleeping, berry eating, and trust system.
Stats
| Attribute | Value |
|---|---|
| Max health | 10 HP |
| Movement speed | 0.3 |
| Follow range | 32 |
| Attack damage | 2 |
Types
- Red Fox: Spawns in normal biomes. Prioritises hunting chickens and rabbits.
- Snow Fox: Spawns in snowy biomes. Prioritises hunting fish.
Trust system
A fox can trust up to two players/entities. The first trusted UUID is the “owner”. Trusted entities:
- Do not trigger fleeing/aggression
- Can hand-feed breeding items
- Baby foxes inherit trust from parents
Behaviour details
Hunting
- Red fox: targets
EntityChickenandEntityRabbit - Snow fox: targets fish entities (not implemented in this version)
- Hunts by creeping (crouching, head-rolling animation), then jumping/chasing
AIMoveToHunt: waits until target is far (>36 blocks), then starts the chase sequenceAIJumpChase: full crouch + jump leap attack when in range
Sleeping
- Foxes sleep during daytime in shaded areas (below sky, path weight ≥ 0)
- Sleeping foxes stop all actions; woken by aggression, swimming, thunder, or nearby threats
- If a trusted player attacks something nearby, fox defends them
Eating
- Picks up nearby items automatically (items, not blocks)
- Holds one item in mouth; can swap by picking up another
- If holding a breeding item dropped by its owner, may follow the owner
- Eating plays a particle effect and sound
Breeding
- Breeding items: Sweet berries (if
enableSweetBerryBushesconfig), otherwise wheat as fallback - Two trusted players can breed; baby inherits random type from parents
- Baby foxes trust both parents
Daylight avoidance
- Flees from sun during daylight: seeks shade, stops wandering
- Will not sleep near occupied points of interest (village-related, not implemented here)
Equipment on spawn
~20% chance to spawn holding one of: emerald (5%), rabbit foot (10%), rabbit hide (10%), egg (15%), wheat (20%), leather (20%), feather (20%). Only spawned if rabbits enabled.
Notes
- Creature attribute: none (ordinary)
- Immune to sweet berry bush damage
attackEntityAsMob: knockback + enchantment processing + fire aspect + biting soundinteract: if breeding item → trigger love mode- Baby chance on spawn: ~5% if nearby spawn limit not exceeded
- Can pick up and hold one item; spits out old item when picking up a new one (unless eating)