{
	code: "gazelle",
	class: "EntityAgent",
	tags: ["animal", "huntable", "adult", "habitat-land"],
	weight: 67,
	variantgroups: [
		{ code: "type", states: ["thomson" ] },
		{ code: "age", states: ["adult"] },
		{ code: "gender", states: ["male", "female"] }
	],
	hitBoxSize: { "x": 1.3,"y": 1.4},
	deadhitBoxSize: { "x": 1.3,"y": 0.75},
	eyeHeight: 1.4,
	attributes: {
		trappable: {
			"small": { trapChance: 0.0,	trapDestroyChance: 0.5 },
			"large": { trapChance: 0.0,	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/thomson/{type}-{gender}" },
		texture: { base: "entity/animal/mammal/hooved/gazelle/{type}-{gender}" },
		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: 19,
				maxhealth: 19
			},
			{
				code: "deaddecay",
				hoursToDecay: 96,
				decayedBlock: "carcass-medium"
			},
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "harvestable", 
				drops: [
					{
						type: "item",
						code: "redmeat-raw",
						quantity: {	avg: 13, var: 3	}
					},
					{
						type: "item",
						code: "hide-raw-large",
						quantity: {	avg: 1.2, var: 0.2 }
					},
					{
						type: "item",
						code: "fat",
						quantity: {	avg: 1,	var: 0.3 }
					}
				]
			},
			{ code: "breathe" },
			{
				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.02
					},
					{
						code: "getoutofwater",
						priority: 1.42,
						movespeed: 0.02,
						animation: "Swim",
						animationSpeed: 1
					},
					{
						code: "stayclosetoentity",
						priority: 1.4,
						enabledByType: {
							"*-female": true,
							"*": false
						},
						animation: "Run",
						entityCode: "gazelle-{type}-adult-male",
						movespeed: 0.05,
						animationSpeed: 1,
						maxDistance: 10,
						searchRange: 25
					},
					{
						code: "seekfoodandeat",
						movespeed: 0.006,
						priority: 1.35,
						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 }, { fromHour: 23, toHour: 4 } ],
						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" }
		],
		spawnconditions: {
			worldgen: {
				triesPerChunk: { avg: 0.02, var: 0 },
				tryOnlySurface: true,
				minLightLevel: 10,
				groupSize: { dist: "verynarrowgaussian", avg: 6, var: 6 },
				insideBlockCodes: ["air", "tallgrass-*", "snowlayer-1", "flower-*"],
				minTemp: 20,
				maxTemp: 90,
				maxRain: 0.5,
				maxForest: 0.1,
				maxY: 1.3,
				companions: ["gazelle-{type}-adult-female", "gazelle-{type}-baby-male", "gazelle-{type}-baby-female"]
			},
			runtime: {
				group: "neutral",
				MinDistanceToPlayer: 24,
				tryOnlySurface: true,
				chance: 0.0006,
				maxQuantity: 4,
				minLightLevel: 10,
				groupSize: { dist: "verynarrowgaussian", avg: 3, var: 4 },
				insideBlockCodes: ["air", "tallgrass-*", "snowlayer-1", "flower-*"],
				minTemp: 20,
				maxTemp: 90,
				maxRain: 0.5,
				maxForest: 0.1,
				maxY: 1.3,
				companions: ["gazelle-{type}-adult-female", "gazelle-{type}-baby-male", "gazelle-{type}-baby-female"]
			}
		}
	},
	sounds: {
		hurt: "creature/sheep/hurt",
		death: "creature/sheep/hurt",
		idle: { path: "creature/sheep/idle", pitch: { avg: 1, var: 0.25 } }
	},
	idleSoundChance: 0.001
}
