{
	code: "fox",
	class: "EntityAgent",
	tags: ["animal", "huntable", "predator", "habitat-land"],
	weight: 0.5,
	variantgroups: [
		{ code: "type", states: ["red", "arctic"] },
		{ code: "age", "states": ["baby"] },
		{ code: "gender", states: ["male", "female"] }
	],
	hitboxSize: {"x": 0.4,"y": 0.4},
	deadHitboxSize: {"x": 0.4,"y": 0.2},
	eyeHeight: 0.7,
	drops: [],
	attributes: {
		killedByInfoText: "deadcreature-eaten",
		creatureDiet: {
			weightedFoodTags: [
				{ weight: 0.9, code: "meat" },
				{ weight: 1, code: "egg" }
			]
		},
		trappable: {
			"small": { trapChance: 0.5,	trapDestroyChance: 0.1 }
		},
		handbook: {
			groupcode: "creaturegroup-fox-{type}",
			trappableGroupCode: "creaturegroup-fox-{type}-{age}"
		},
	},
	client: {
		renderer: "Shape",
		shape: { base: "entity/animal/mammal/fox/fox-baby" },
		texture: { base: "entity/animal/mammal/fox/{type}-baby" },
		behaviors: [
			{ code: "repulseagents" }, 
			{ code: "controlledphysics", stepHeight: 1.1251 }, 
			{ code: "interpolateposition" }, 
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "harvestable" },
			{ code: "despawn", minPlayerDistance: 16, belowLightLevel: 8, minSeconds: 300 },
			{ code: "ropetieable", minGeneration: 2 }
		],
		animations: [
			{
				code: "hurt",
				animation: "hurt", 
				animationSpeed: 2.2,
				weight: 10,
				blendMode: "AddAverage" 
			},
			{
				code: "die",
				animation: "death", 
				animationSpeed: 1.25,
				weight: 10,
				blendMode: "Average",
				triggeredBy: { onControls: ["dead"] }
			},
			{ 
				code: "idle", 
				animation: "idle",
				blendMode: "AddAverage",
				easeOutSpeed: 4,
				triggeredBy: { defaultAnim: true },
			},
			{
				code: "sleep", 
				animation: "sleep",
				easeInSpeed: 4,
				easeOutSpeed: 4,
				blendMode: "Average", 
			},
			{
				code: "sit", 
				animation: "sit",
				easeInSpeed: 4,
				easeOutSpeed: 4,
				blendMode: "Average", 
			}
		]
	},
	server: {
		behaviors: [
			{ code: "ropetieable", minGeneration: 2 },
			{ code: "repulseagents" }, 
			{ code: "controlledphysics", stepHeight: 1.1251 },
			{ code: "despawn", minPlayerDistance: 8, belowLightLevel: 8, minSeconds: 300 },
			{ code: "health", 
				currenthealth: 3,
				maxhealth: 3
			},
			{ code: "deaddecay", 
				hoursToDecay: 96, 
				decayedBlock: "carcass-tiny"
			},
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "harvestable", drops: [] },
			{ code: "breathe" },
			{ code: "grow", 
				hoursToGrow: 336,
				adultEntityCodes: ["fox-{type}-adult-{gender}"]
			},
			{ 
				code: "emotionstates",
				states: [
					{ code: "fleeondamage", duration: 10, chance: 1, slot: 0, priority: 1, accumType: "max" },
					{ code: "saturated", duration: 1200, chance: 1, slot: 0, priority: 1, accumType: "sum" }
				],
			},
			{ 
				code: "taskai",
				aiCreatureType: "LandCreature",
				aitasks: [
					{
						code: "fleeentity",
						entityCodes: ["player", "wolf-*", "hyena-*", "bear-*"],
						priority: 2,
						movespeed: 0.03,
						seekingRange: 14,
						animation: "Run",
						animationSpeed: 2.5
					},
					{
						code: "seekentity",
						entityCodes: ["chicken-rooster", "chicken-hen", "chicken-baby", "hare-*"],
						priority: 1.5,
						movespeed: 0.04,
						animationSpeed: 2,
						seekingRange: 20,
						maxFollowTime: 20,
						animation: "Run",
						sound: "creature/fox/growl",
						whenNotInEmotionState: "saturated"
					},
					{
						code: "followleadholder",
						minGeneration: 2,
						priority: 1.45,
						animation: "walk",
						animationSpeed: 2.2,
						movespeed: .01
					},
					{
						code: "getoutofwater",
						priority: 1.4,
						movespeed: 0.015,
						animation: "Walk",
						animationSpeed: 2.2
					},
					{
						code: "stayclosetoentity",
						priority: 1.4,
						entityCode: "fox-{type}-adult-female",
						movespeed: 0.02,
						animationSpeed: 3,
						maxDistance: 5,
						searchRange: 25,
						animation: "Run"
					},
					{
						code: "stayclosetoentity",
						priority: 1.39,
						entityCode: "fox-{type}-adult-male",
						movespeed: 0.02,
						animationSpeed: 3,
						maxDistance: 5,
						searchRange: 25,
						animation: "Run"
					},
					{
						code: "idle",
						priority: 1.38,
						minduration: 200000,
						maxduration: 800000,
						mincooldown: 10000,
						maxcooldown: 30000,
						priorityForCancel: 1.38,
						animation: "Sleep",
						whenNotInEmotionState: "aggressiveondamage",
						duringDayTimeFrames: [ { fromHour: 10, toHour: 18 }, { fromHour: 1, toHour: 4 } ],
						stopOnNearbyEntityCodes: ["player", "wolf-*", "hyena-*", "bear-*"],
						stopRange: 8,
						stopOnHurt: true
					},
					{
						code: "idle",
						onBlockBelowCode: "snowblock",
						priority: 1.35,
						priorityForCancel: 5,
						minduration: 2400,
						maxduration: 2400,
						mincooldown: 8000,
						maxcooldown: 30000,
						animation: "Dive",
						animationSpeed: 1.25,
						sound: "walk/deepsnow1",
						soundStartMs: 950
					},
					{
						code: "seekfoodandeat",
						movespeed: 0.006,
						priority: 1.3,
						eatItemCategories: ["protein"],
						eatSound: "creature/animal-eat-small",
						eatTime: 1.5,
						animation: "Walk",
						eatAnimation: "Eat",
						mincooldownHours: 1,
						maxcooldownHours: 4
					},
					{
						code: "idle",
						priority: 1.2,
						priorityForCancel: 1.35,
						minduration: 2500,
						maxduration: 2500,
						mincooldown: 6000,
						maxcooldown: 20000,
						animation: "Sniff",
						stopOnNearbyEntityCodes: ["player"],
						animationSpeed: 1.25
					},
					{
						code: "wander", 
						priority: 1.0, 
						priorityForCancel: 1.35,
						movespeed: 0.004,
						animation: "Walk",
						stopOnNearbyEntityCodes: ["player"],
						preferredLightLevel: 20
					},
					{
						code: "idle",
						priority: 0.9,
						minduration: 5000,
						maxduration: 30000,
						mincooldown: 2000,
						maxcooldown: 120000,
						priorityForCancel: 1.39,
						animation: "Sit",
						stopOnNearbyEntityCodes: ["player"],
						stopRange: 5
					},
					{ 
						code: "lookaround", 
						priority: 0.5
					}
				]
			},
			{ code: "pettable", minGeneration: 1 },
			{ code: "entitystatetags" }
		]
	},
	sounds: {
		hurt: "creature/fox/hurt",
		death: "creature/fox/die",
		idle: { path: "creature/fox/yip", pitch: { avg: 1, var: 0.25 } }
	},
	idleSoundChance: 0
}
