{
	code: "gazelle",
	class: "EntityAgent",
	tags: ["animal", "huntable", "habitat-land"],
	weight: 4,
	variantgroups: [
		{ code: "type", states: ["thomson" ] },
		{ code: "age", states: ["baby"] },
		{ code: "gender", states: ["male", "female"] }
	],
	hitBoxSize: { "x": 0.7,"y": 0.7},
	deadhitBoxSize: { "x": 0.6,"y": 0.3},
	eyeHeight: 0.6,
	attributes: {
		trappable: {
			"small": { trapChance: 0.0,	trapDestroyChance: 0.3 },
			"large": { trapChance: 0.5,	trapDestroyChance: 0 }
		},
		creatureDiet: {
			foodCategories: ["Vegetable", "Grain"],
			weightedFoodTags: [
				{ weight: 0.5, code: "nibbleCrop" }, 
				{ weight: 0.1, code: "grass" },
				{ weight: 0.9, code: "fruitmash" },
				{ weight: 1, code: "tastyvegetable" }
			],
			skipFoodTags: ["rice", "parsnip"]
		},
		handbook: {
			groupcode: "creaturegroup-gazelle",
			trappableGroupCode: "creaturegroup-gazelle-{type}-{age}"
		}
	},
	drops: [],
	client: {
		renderer: "Shape",
		shape: { base: "entity/animal/mammal/hooved/gazelle/{type}/{type}-{age}" },
		texture: { base: "entity/animal/mammal/hooved/gazelle/{type}-{age}" },
		behaviors: [
			{ code: "repulseagents" },
			{ code: "controlledphysics", stepHeight: 1.1251 },
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "interpolateposition" },
			{ code: "harvestable" },
			{ code: "despawn", minPlayerDistance: 8, belowLightLevel: 8, minSeconds: 300 },
			{ code: "ropetieable", minGeneration: 2 }
		],
		animations: [
			{
				code: "hurt",
				animation: "hurt",
				animationSpeed: 2.2,
				weight: 10,
				blendMode: "AddAverage"
			},
			{
				code: "die",
				animation: "die",
				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: {
		attributes: {
			pathfinder: {
				minTurnAnglePerSec: 90,
				maxTurnAnglePerSec: 180
			},
			handbook: {
				groupcode: "creaturegroup-gazelle"
			}
		},
		behaviors: [
			{ code: "repulseagents" },
			{ code: "controlledphysics", stepHeight: 1.1251 },
			{ code: "despawn", minPlayerDistance: 8, belowLightLevel: 8, minSeconds: 300 },
			{
				code: "health",
				currenthealth: 5,
				maxhealth: 5
			},
			{
				code: "deaddecay",
				hoursToDecay: 96,
				decayedBlock: "carcass-small"
			},
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "harvestable", 
				drops: [
					{
						type: "item",
						code: "redmeat-raw",
						quantity: {	avg: 2,	var: 1	}
					},
					{
						type: "item",
						code: "hide-raw-small",
						quantity: {	var: 0,	avg: 1.3 }
					}
				]
			},
			{ code: "breathe" },
			{ 
				code: "grow", 
				hoursToGrow: 336,
				adultEntityCodes: ["gazelle-{type}-adult-{gender}"]
			},
			{
				code: "emotionstates",
				states: [
					{ code: "fleeondamage", duration: 60, chance: 0.85, slot: 0, priority: 5, accumType: "max", whenHealthRelBelow: 0.4 },
					{ code: "fleeondamage", duration: 30, chance: 1, slot: 0, priority: 1, accumType: "max" },
					{ code: "alarmherdondamage", chance: 1, slot: 1, priority: 1, accumType: "max" }
				]
			},
			{
				code: "taskai",
				aiCreatureType: "LandCreature",
				aitasks: [
					{
						code: "fleeentity",
						instafleeOnDamageChance: 1,
						entityCodes: ["player", "wolf-*", "hyena-*"],
						priority: 1.5,
						movespeed: 0.065,
						seekingRange: 30,
						animation: "Run",
						animationSpeed: 2,
						sound: "creature/sheep/hurt2"
					},
					{
						code: "followleadholder",
						minGeneration: 2,
						priority: 1.45,
						animation: "Walk",
						animationSpeed: 1,
						movespeed: 0.012
					},
					{
						code: "stayclosetoentity",
						animation: "Run",
						priority: 1.43,
						entityCode: "gazelle-{type}-adult-female",
						movespeed: 0.05,
						animationSpeed: 3,
						maxDistance: 5,
						searchRange: 25
					},
					{
						code: "getoutofwater",
						priority: 1.4,
						movespeed: 0.02,
						animation: "Swim",
						animationSpeed: 1
					},
					{
						code: "seekfoodandeat",
						priority: 1.35,
						movespeed: 0.006,
						eatSound: "player/eat",
						eatTime: 1.5,
						animationSpeed: 1.5,
						animation: "Walk",
						mincooldownHours: 1,
						maxcooldownHours: 4
					},
					{
						code: "idle",
						priority: 1.3,
						priorityForCancel: 1,
						minduration: 2600,
						maxduration: 10000,
						mincooldown: 6000,
						maxcooldown: 20000,
						animation: "Eat",
						animationSpeed: 1,
						whenNotInEmotionState: "aggressiveondamage"
					},
					{
						code: "idle",
						priority: 1.2,
						priorityForCancel: 1.35,
						minduration: 2500,
						maxduration: 2500,
						mincooldown: 6000,
						maxcooldown: 20000,
						animation: "Idle",
						animationSpeed: 1.25,
						whenNotInEmotionState: "aggressiveondamage"
					},
					{
						code: "wander",
						priority: 1.0,
						movespeed: 0.007,
						animationSpeed: 1,
						animation: "Walk",
						preferredLightLevel: 24,
						priorityForCancel: 1.37
					},
					{
						code: "idle",
						priority: 1.31,
						priorityForCancel: 1.35,
						minduration: 5000,
						maxduration: 30000,
						mincooldown: 2000,
						maxcooldown: 120000,
						animation: "Sit",
						supressDefaultAnimation: true,
						whenNotInEmotionState: "fleeondamage",
						stopOnNearbyEntityCodes: ["player"],
						duringDayTimeFrames: [ { fromHour: 12, toHour: 16 } ],
						stopRange: 15
					},
					{
						code: "idle",
						priority: 1.32,
						priorityForCancel: 1.35,
						minduration: 5000,
						maxduration: 30000,
						mincooldown: 2000,
						maxcooldown: 120000,
						animation: "Sleep",
						duringDayTimeFrames: [ { fromHour: 23, toHour: 4 } ],
						whenNotInEmotionState: "fleeondamage",
						stopOnNearbyEntityCodes: ["player"],
						stopRange: 15
					},
					{
						code: "lookaround",
						priority: 0.5
					}
				]
			},
			{ code: "ropetieable", minGeneration: 2 },
			{ code: "pettable", minGeneration: 1 },
			{ code: "entitystatetags" }
		]
	},
	sounds: {
		hurt: "creature/sheep/hurt",
		death: "creature/sheep/hurt",
		idle: { path: "creature/sheep/idle", pitch: { avg: 1, var: 0.25 } }
	},
	idleSoundChance: 0.001
}
