{
	code: "raccoon",
	class: "EntityAgent",
	tags: ["animal", "huntable", "habitat-land"],
	weight: 1,
	variantgroups:  [ 
		{ code: "type", states: ["common"]},
		{ code: "age", states: ["baby"] },
		{ code: "gender", states: ["male", "female"] },
	] ,
	hitboxSize: { x: 0.4, y: 0.4 },
	deadHitboxSize: { x: 0.4, y: 0.25 },
	eyeHeight: 0.4,
	attributes: {
		creatureDiet: {
			foodCategories: ["Fruit"],
			foodTags: ["lootableSweet", "sweetBerryBush", "egg"],
			weightedFoodTags: [
				{ weight: 0.9, code: "fruit" },
				{ weight: 1, code: "egg" },
				{ weight: 1, code: "lootableSweet" },
				{ weight: 1, code: "sweetBerryBush" },
				{ weight: 0.2, code: "peanut" }
			]
		},
		trappable: {
			"small": { trapChance: 0.5,	trapDestroyChance: 0.05 }
		},
		"handbook": {
			"groupcode": "creaturegroup-raccoon",
			trappableGroupCode: "creaturegroup-raccoon-{type}-{age}"
		}
	},
	drops: [
		
	],
	client: {
		renderer: "Shape",
		shape: { base: "entity/animal/mammal/raccoon/{type}-baby" },
		texture: { base: "entity/animal/mammal/raccoon/{type}-baby*" }, 
		size: 0.9,
		sizeGrowthFactor: 0.2,
		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: "death", 
				animationSpeed: 1.25,
				weight: 10,
				blendMode: "Average",
				triggeredBy: { onControls: ["dead"] }
			},
			{ 
				code: "idle", 
				animation: "idle",
				blendMode: "AddAverage",
				easeOutSpeed: 4,
				triggeredBy: { defaultAnim: true },
			}
		]
	},
	server: {
		behaviors: [
			{ code: "ropetieable", minGeneration: 2 },
			{ 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-tiny" },
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "harvestable", drops: [
				
				],
			},
			{ code: "breathe" },
			{ 
				hoursToGrow: 336,
				adultEntityCodes: [ "raccoon-{type}-adult-{gender}" ],
				code: "grow" 
			},
			{ 
				code: "taskai",
				aiCreatureType: "LandCreature",
				aitasks: [
					{
						code: "fleeentity",
						instafleeOnDamageChance: 1,
						entityCodes: ["player", "wolf-*", "bear-*"],
						priority: 1.5,
						movespeed: 0.02,
						animationSpeed: 2.2,
						seekingRange: 8,
						animation: "Run"
					},
					{
						code: "followleadholder",
						minGeneration: 2,
						priority: 1.47,
						animation: "walk",
						animationSpeed: 1,
						movespeed: 0.006
					},
					{
						code: "getoutofwater",
						priority: 1.45,
						movespeed: 0.015,
						animation: "Walk",
						animationSpeed: 2.2
					},
					{
						code: "stayclosetoentity",
						priority: 1.4,
						entityCode: "raccoon-{type}-adult-female",
						movespeed: 0.02,
						animationSpeed: 3,
						maxDistance: 5,
						searchRange: 25,
						animation: "Run"
					},
					{
						code: "stayclosetoentity",
						priority: 1.39,
						entityCode: "raccoon-{type}-adult-male",
						movespeed: 0.02,
						animationSpeed: 3,
						maxDistance: 5,
						searchRange: 25,
						animation: "Run"
					},
					{
						code: "seekfoodandeat",
						priority: 1.35,
						eatSound: "creature/animal-eat-small",
						eatTime: 1.5,
						movespeed: 0.0065,
						animation: "Walk",
						doConsumePortion: false,
						mincooldownHours: 1,
						maxcooldownHours: 4,
					},
					{
						code: "idle",
						priority: 1.3,
						priorityForCancel: 1.35,
						minduration: 2500,
						maxduration: 2500,
						mincooldown: 10000,
						maxcooldown: 50000,
						animation: "Sniff",
						animationSpeed: 0.8,
					},
					{
						code: "wander", 
						priority: 1.0, 
						priorityForCancel: 1.35,
						movespeed: 0.004,
						animationSpeed: 2,
						animation: "Walk",
						preferredLightLevel: 24
					},
					{
						code: "idle",
						priority: 0.9,
						minduration: 5000,
						maxduration: 30000,
						mincooldown: 2000,
						maxcooldown: 120000,
						priorityForCancel: 1.35,
						animation: "Sit"
					},
					{ 
						code: "lookaround", 
						priority: 0.5
					}
				]
			},
			{ code: "entitystatetags" }
		]
	},
	sounds: {
		hurt: "creature/raccoon/pup-hurt",
		death: "creature/raccoon/pup-death",
		idle: { path: "creature/raccoon/pup-idle", pitch: { avg: 1, var: 0.25 } }
	},
	idleSoundChance: 0.01
}
