{
	code: "door",
	class: "BlockGeneric",
	entityClass: "Generic",
	behaviors: [ 
		{ name: "Door" }, 
		{ name: "BlockEntityInteract" }, 
		{ name: "Lockable" }
	],
	entityBehaviors: [{ name: "Door" }],
	variantgroups: [
		{ code: "style", states: ["1x2heavy", "1x3heavy", "2x4heavy"] },
		{ code: "material", states: ["aged"] },
		{ code: "style", states: ["ruined-barred1", "ruined-barred2", "ruined-barred3", "ruined-sleek1", "ruined-sleek2", "ruined-sleek3", "ruined-solid1", "ruined-solid2", "ruined-solid3"], combine: "add" },
	],
	attributes: {
		handopenable: false,
		handbook: {
			groupBy: ["door-{material}-*"]
		},
		widthByType: {
			"door-2x2gate-*": 2,
			"door-2x4heavy-*": 2,
			"*": 1
		},
		heightByType: {
			"door-1x3heavy-*": 3,
			"door-2x4heavy-*": 4,
			"*": 2
		},
		openSoundByType: {
			"door-1x3heavy-*": "sounds/block/largedoor-open",
			"door-2x4heavy-*": "sounds/block/largedoor-open",
			"door-2x2gate-*": "sounds/block/largedoor-open",
			"*": "sounds/block/door"
		},
		closeSoundByType: {
			"door-1x3heavy-*": "sounds/block/largedoor-close",
			"door-2x4heavy-*": "sounds/block/largedoor-close",
			"door-2x2gate-*": "sounds/block/largedoor-close",
			"*": "sounds/block/door"
		},
		easingSpeedByType: {
			"door-1x3heavy-*": 3,
			"door-2x4heavy-*": 1,
			"*": 10
		},
		airtightByType: {
			"door-1x2heavy-*": false
		},
		liquidBarrierHeightByType: {
			"door-1x2heavy-*": [
				[0.4375],
				[1.0]
			]
		}
	},
	creativeinventoryByType: {
		"*": { "general": ["*"], "clutter": ["*"] }
	},
	shape: { base: "block/metal/door/{style}" },
	// Needs to be no cull pass because for double doors we flip x coords, but indices don't change so i believe that inverts the winding order, making the graphics card believe the face is facing the other direction
	renderPass: "OpaqueNoCull",
	faceCullMode: "NeverCull",
	blockmaterial: "Metal",
	sideAo: { all: false },
	heldTpIdleAnimation: "holdunderarm",
	replaceable: 500,
	resistance: 3.5,
	lightAbsorption: 0,
	sidesolid: {
		all: false
	},
	sideopaque: {
		all: false
	},
	guiTransformByType: {
		"door-2x4heavy-*": {
			origin: { x: 1, y: 2, z: 1 },
			scale: 0.73
		},
		"door-1x3heavy-*": {
			origin: { x: 0.5, y: 1.5, z: 1 },
			scale: 0.73
		},
		"*": {
			origin: { x: 0.49, y: 1, z: 0.8 },
			scale: 0.73
		},
	},
	tpHandTransformByType: {
		"door-2x4heavy-*": {
			translation: { x: -0.84, y: -2.81, z: -1.46 },
			rotation: { x: 12, y: 11, z: 59 },
			origin: { x: 1, y: 2, z: 1 },
			scale: 0.71
		},
		"door-1x3heavy-*": {
			translation: { x: -0.44, y: -1.82, z: -1.3 },
			rotation: { x: 8, y: 11, z: 59 },
			origin: { x: 0.5, y: 1.5, z: 1 },
			scale: 0.71
		},
		"*": {
			translation: { x: -0.74, y: -1.22, z: -1.3 },
			rotation: { x: 8, y: 11, z: 59 },
			origin: { x: 0.5, y: 1, z: 1 },
			scale: 0.71
		}
	},
	groundTransformByType: {
		"door-2x4heavy-*": {
			translation: { x: 0, y: 0, z: 0 },
			rotation: { x: -90, y: 0, z: 0 },
			origin: { x: 1, y: 2, z: 0.85 },
			scale: 3
		},
		"door-1x3heavy-*": {
			translation: { x: 0, y: 0, z: 0 },
			rotation: { x: -90, y: 0, z: 0 },
			origin: { x: 0.5, y: 1.5, z: 0.85 },
			scale: 3
		},
		"*": {
			translation: { x: 0, y: 0, z: 0 },
			rotation: { x: -90, y: 0, z: 0 },
			origin: { x: 0.5, y: 1, z: 0.85 },
			scale: 3
		}
	},
	selectionboxByType: {
		"door-ruined-*": { x1: 0, y1: 0, z1: 0.75, x2: 1, y2: 1, z2: 1 },
		"*": { x1: 0, y1: 0, z1: 0.875, x2: 1, y2: 1, z2: 1 },
	},
	collisionboxByType: {
		"door-ruined-*": { x1: 0, y1: 0, z1: 0.75, x2: 1, y2: 1, z2: 1 },
		"*": { x1: 0, y1: 0, z1: 0.875, x2: 1, y2: 1, z2: 1 },
	},
	sounds: {
		"place": "block/metaldoor-place",
		"break": "block/metaldoor-place",
		"hit": "block/metaldoor-place",
		"walk": "walk/stone*"
	},
	materialDensity: 600,
	dropsByType: {
		"door-2x4*": [{ code: "metal-scraps", quantity: { avg: 12, var: 4 } }],
		"door-1x3*": [{ code: "metal-scraps", quantity: { avg: 6, var: 2 } }],
		"*": [{ code: "metal-scraps", quantity: { avg: 3, var: 1 } }]
	}
}
