{
	code: "firepit",
	class: "BlockFirepit",
	entityClass: "Firepit",
	entityBehaviors: [
		{ name: "FirepitAmbient" },
		{ name: "TemperatureSensitive" }
	],
	behaviorsByType: {
		"*-construct*": [ {name: "Unstable"}],
		"*": [{ name: "Lockable" }, {name: "Container"}, {name: "Unstable"}, { name: "Ignitable" }, { name: "HeatSource" }],
	},
	variantgroups: [
		{ code:"burnstate", states: ["construct1", "construct2", "construct3", "construct4", "extinct", "lit", "cold"] }
	],
	attributes: {
		reinforcable: true,
		"humanoidTraversalCost": 100,
		handbook: {
			include: true,
			extraSections: [
				{ title: "firepit-handbook-help-title", text: "firepit-handbook-help-text" }
			]
		}
	},	
	renderpass: "OpaqueNoCull",
	shape: { base: "block/wood/firepit/{burnstate}-normal" },
	faceCullMode: "NeverCull",
	textures: {
		"ceramic": { base: "block/clay/ceramic" },
		"tinder": { base: "block/hay/normal-side" },
		"log": { base: "block/wood/firepit/log" },
		"birch": { base: "block/wood/debarked/birch" },
		"charred": { base: "block/wood/charred" },
		"ashes": { base: "block/wood/firepit/ground" },
		"aged": { base: "block/wood/debarked/aged" },
		"fire": { base: "block/wood/firepit/fire" },
		"walnut-h": { base: "block/wood/bark/walnut-h" },
		"ember": { base: "block/coal/ember" }
	},
	creativeinventory: { general: ["firepit-extinct"], decorative: ["firepit-extinct"] },
	blockmaterial: "Wood",
	lightAbsorption: 0,
	lightHsvByType: {
		"firepit-extinct": [7, 7, 3],
		"firepit-lit": [7, 7, 16],
	},
	particlePropertiesByType: {
		"firepit-extinct": [
			{
				hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
				opacityEvolve: { transform: "quadratic", factor: -16 },
				gravityEffect: { avg: 0, var: 0 },
				posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
				velocity: [ { avg: 0, var: 0.05 }, { avg: 0.1, var: 0.05 }, { avg: 0, var: 0.05 }],
				quantity: { avg: 0.02 },
				size: { avg: 0.3, var: 0.05 },
				sizeEvolve: { transform: "linear", factor: 1.5 },
				particleModel: "Quad",
				windAffectednes: 0.7
			}
		],
		"firepit-lit": [
			{
				// Ember cubicles
				hsvaColor: [{ avg: 30, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
				gravityEffect: { dist: "invexp", avg: -0.1, var: 0.4 },
				posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
				velocity: [ { avg: 0, var: 0.15 }, { avg: 0.5, var: 0.1 }, { avg: 0, var: 0.15 }],
				quantity: { avg: 0.015 },
				size: { avg: 0.4, var: 0 },
				sizeEvolve: { transform: "quadratic", factor: -0.7 },
				lifeLength: { avg: 1.5 },
				vertexFlags: 128,
				windAffectednes: 0.2
			},
			{
				// Smoke quads
				hsvaColor: [{ avg: 0, var: 0 }, { avg: 0, var: 0 }, { avg: 70, var: 30 },  { avg: 220, var: 50 }],
				opacityEvolve: { transform: "linear", factor: -255 },
				gravityEffect: { avg: 0, var: 0 },
				posOffset: [ { avg: 0, var: 0.2 }, { avg: -0.4, var: 0 }, { avg: 0, var: 0.2 }],
				velocity: [ { avg: 0, var: 0.025 }, { avg: 0.2, var: 0.05 }, { avg: 0, var: 0.025 }],
				quantity: { avg: 0.08 },
				size: { avg: 0.3, var: 0.05 },
				sizeEvolve: { transform: "linear", factor: 1.5 },
				particleModel: "Quad",
				lifeLength: { avg: 18 },
				selfPropelled: true,
				windAffectednes: 0.7
			},
			{
				// Fire quads
				hsvaColor: [{ avg: 20, var: 20 }, { avg: 255, var: 50 }, { avg: 255, var: 50 },  { avg: 255, var: 0 }],
				opacityEvolve: { transform: "quadratic", factor: -16 },
				gravityEffect: { avg: 0, var: 0 },
				posOffset: [ { avg: 0, var: 0.1 }, { avg: -0.3, var: 0 }, { avg: 0, var: 0.1 }],
				velocity: [ { avg: 0, var: 0.1 }, { avg: 0.125, var: 0.05 }, { avg: 0, var: 0.1 }],
				quantity: { avg: 1 },
				size: { avg: 0.35, var: 0.05 },
				lifeLength: { avg: 0.25 },
				sizeEvolve: { transform: "linear", factor: 0.25 },
				particleModel: "Quad",
				vertexFlags: 128,
				windAffectednes: 0.5
			}
		]
	},
	sidesolid: {
		all: false
	},
	sideopaque: {
		all: false
	},
	replaceable: 10,
	resistanceByType: {
		"firepit-construct1": .25,
		"firepit-construct2": .35,
		"firepit-construct3": .45,
		"firepit-construct4": .55,
		"*": 1.5
	},
	collisionbox: null,
	selectionbox: { x1: 0.125, y1: 0, z1: 0.125, x2: 0.875, y2: 0.5, z2: 0.875 },
	guiTransform: {
		origin: { x: 0.5, y: 0.0625, z: 0.5 },
		scale: 1.5
	},
	dropsByType: {
		"firepit-construct1": [	
			{ type: "item", code: "drygrass", quantity: { avg: 1 } },
			{ type: "item",	code: "firewood", quantity: { avg: 0 } },
		],
		"firepit-construct2": [	
			{ type: "item", code: "drygrass", quantity: { avg: 1 } },
			{ type: "item",	code: "firewood", quantity: { avg: 1 } },
		],
		"firepit-construct3": [	
			{ type: "item", code: "drygrass", quantity: { avg: 1 } },
			{ type: "item",	code: "firewood", quantity: { avg: 2 } },
		],
		"firepit-construct4": [	
			{ type: "item", code: "drygrass", quantity: { avg: 1 } },
			{ type: "item",	code: "firewood", quantity: { avg: 3 } },
		],
		"*": [ ],
	},
	materialDensity: 600,
	sounds: {
		"place": "block/planks",
		"hit": "block/planks",
		"break": "block/planks"
	},
}