{
	code: "bell",
	class: "EntityBell",
	tags: ["mechanical", "habitat-land"],
	weight: 80,
	canClimb: false,
	hitboxSize: { x: 0.75, y: 0.85 },
	selectionBoxSize: { x: 0.85, y: 1.5 },
	deadCollision: { x: 0.75, y: 0.85 },
	eyeHeight: 0.75,
	attributes: {
		glitchAffected: true,
		onDeathStabilityRecovery: 0.15,
		isMechanical: true
	},
	variantgroups: [
		{ code: "type", states: ["normal"]},
	],
	drops: [
		{
			type: "item",
			code: "gear-rusty",
			dropModbyStat: "rustyGearDropRate",
			quantity: { avg: 1.2, var: 1 }
		},
		{
			type: "block",
			code: "metal-parts",
			quantity: { avg: 1.5, var: 0 }
		},
		{
			type: "block",
			code: "metal-scraps",
			quantity: { avg: 3.5, var: 2 }
		},
		{ 
			type: "item",
			code: "stackrandomizer-tuningcylinder",
			quantity: { avg: 1 }
		},
		{ 
			type: "item",
			code: "stackrandomizer-alljonas",
			quantity: { avg: 0.2 }
		}
	],
	client: {
		renderer: "Shape",
		shape: { base: "entity/lore/bell/bell" },
		size: 1.3,
		behaviors: [
			{ code: "repulseagents" }, 
			{ code: "controlledphysics", stepHeight: 1.1251 }, 
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "interpolateposition" }
		],
		animations: [
			{
				code: "hurt",
				animation: "hurt", 
				animationSpeed: 1.2,
				weight: 10,
				blendMode: "AddAverage" 
			},
			{
				code: "die",
				animation: "die", 
				animationSpeed: 0.7,
				weight: 10,
				blendMode: "Average",
				triggeredBy: { onControls: ["dead"] }
			},
			{ 
				code: "idle", 
				animation: "idle",
				blendMode: "Average", 
				triggeredBy: { defaultAnim: true },
			}
		]
	},
	server: {
		behaviors: [
			{ code: "repulseagents" }, 
			{ code: "controlledphysics", stepHeight: 1.1251 },
			{ code: "health", currenthealth: 100, maxhealth: 100 },
			{ code: "floatupwhenstuck", onlyWhenDead: true },
			{ code: "deaddecay", hoursToDecay: 24 },
			{ code: "despawn", minPlayerDistance: 30, minSeconds: 900 },
			{
				code: "taskai",
				aitasks: [
					{
						code: "bellalarm",
						onNearbyEntityCodes: ["player"],
						spawnMobs: [
							"drifter-deep",
							"drifter-tainted",
							"drifter-tainted",
							"drifter-corrupt",
							"shiver-deep",
							"bowtorn-deep",
							"locust-corrupt",
						],
						spawnMaxQuantity: 6,
						spawnIntervalMsMin: 1000,
						spawnIntervalMsMax: 5000,
						spawnRange: 12,
						priority: 1.5,
						seekingRange: 15,
						animationSpeed: 1,
						animation: "alarm",
						repeatSound: "creature/bell/alarm"
					},
					{
						code: "idle",
						id: "listen",
						priority: 1.4,
						priorityForCancel: 1.35,
						minduration: 4000,
						maxduration: 6000,
						executionChance: 0.5,
						initialMinCoolDown: 2000,
						initialMaxCoolDown: 10000,
						mincooldown: 2000,
						maxcooldown: 10000,
						animation: "listen",
						sound: "creature/bell/listen",
						animationSpeed: 1
					},
					{
						code: "idle",
						priority: 1.2,
						priorityForCancel: 2,
						executionChance: 0.01,
						initialMinCoolDown: 2000,
						initialMaxCoolDown: 15000,
						minduration: 200000,
						maxduration: 800000,
						mincooldown: 5000,
						maxcooldown: 20000,
						animation: "hide",
						animationSpeed: 0.75,
						stopOnNearbyEntityCodes: ["player"],
						stopRange: 10,
						stopOnHurt: true
					},
					{
						code: "wander", 
						priority: 1.0, 
						movespeed: 0.0065,
						animationSpeed: 1,
						animation: "walk",
						sound: "creature/bell/walk",
						soundRepeatMs: 1333,
						preferredLightLevel: 15
					},
					{
						code: "getoutofwater",
						priority: 1.4,
						movespeed: 0.01,
						animation: "walk",
						animationSpeed: 1.6
					},
					{ 
						code: "lookaround", 
						priority: 0.5
					}
				]
			},
			{ code: "entitystatetags" }
		],
		spawnconditions: {
			runtime: {
				group: "hostile",
				maxQuantity: 3,
				maxLightLevel: 5,
				chance: 0.0018,
				lightLevelType: "MaxTimeOfDayLight",
				groupSize:{ dist: "invexp", avg: 1, var: 0 },
				insideBlockCodes: ["air"],
				maxY: 0.7,
			}
		}
	},
	sounds: {
		hurt: "creature/bell/hurt",
		death: "creature/bell/death"
	}
}
