import * as Vector3 from "./vector3";

const baseSize = { small: 15, average: 30, big: 9999 };
const baseHeight = { low: 10, average: 30, high: 50 };


export const data = [   { "item": "tcs_cba:ender_fortress", "name": "Ender Fortress", "size": 49, "height": 41, "offset": {x: 24, y: 0, z: 46}, "fly": true }, 
						{ "item": "tcs_cba:desert_fortress", "name": "Desert Fortress", "size": 29, "height": 20, "fly": true },
						{ "item": "tcs_cba:pyramid_fortress", "name": "Pyramid Fortress", "size": 49, "height": 33, "offset": {x: 23, y: 0, z: 41}, "fly": true },
						{ "item": "tcs_cba:haunted_fortress", "name": "Haunted Fortress", "size": 49, "height":55, "offset": {x: 21, y: 0, z: 42}, "fly": true },
						{ "item": "tcs_cba:royal_fortress", "name": "Royal Fortress", "size": 49, "height": 75, "offset": {x: 23, y: 0, z: 23}, "fly": true },

						{ "item": "tcs_cba:country_stronghold", "name": "Country Stronghold", "size": 49, "height": 15, "offset": {x: 24, y: 1, z: 33}, "fly": true },
						{ "item": "tcs_cba:livestock_stronghold", "name": "Livestock Stronghold", "size": 41, "height": 21, "fly": true },
						{ "item": "tcs_cba:desert_stronghold", "name": "Desert Stronghold", "size": 59, "height": 35, "offset": {x: 29, y: 1, z: 34}, "fly": true },
						{ "item": "tcs_cba:nether_stronghold", "name": "Nether Stronghold", "size": 59, "height": 35, "offset": {x: 29, y: 1, z: 38}, "fly": true },
						{ "item": "tcs_cba:dark_stronghold", "name": "Dark Stronghold", "size": 59, "height": 35, "offset": {x: 29, y: 1, z: 36}, "fly": true },

						{ "item": "tcs_cba:steampunk_tower", "name": "Steampunk Tower", "size": 49, "height": 74, "offset": {x: 23, y: 1, z: 42}, "fly": true },
						{ "item": "tcs_cba:floating_towers", "name": "Floating Towers", "size": 41, "height": 47, "fly": true },
						{ "item": "tcs_cba:dark_tower", "name": "Dark Tower", "size": 41, "height": 90, "fly": true },
						{ "item": "tcs_cba:dragon_tower", "name": "Dragon Tower", "size": 49, "height": 73, "offset": {x: 24, y: 0, z: 38}, "fly": true },
						{ "item": "tcs_cba:bell_tower", "name": "Bell Tower", "size": 29, "height": 52, "fly": true },

						{ "item": "tcs_cba:tree_house_garden", "name": "Tree House Garden", "size": 29, "height": 25, "fly": true },
						{ "item": "tcs_cba:floating_tree_house", "name": "Floating Tree House", "size": 29, "height": 47, "fly": true },
						{ "item": "tcs_cba:fancy_tree_house", "name": "Fancy Tree House", "size": 41, "height": 55, "fly": true },
						{ "item": "tcs_cba:wooden_tree_house", "name": "Wooden Tree House", "size": 29, "height": 45, "fly": true },
						{ "item": "tcs_cba:tree_house_keep", "name": "Tree House Keep", "size": 41, "height": 40, "fly": true },

						{ "item": "tcs_cba:underground_mansion", "name": "Underground Mansion", "size": 49, "height": 22, "offset": {x: 23, y: 16, z: 33}  },
						{ "item": "tcs_cba:modern_mansion", "name": "Modern Mansion", "size": 49, "height": 31, "offset": {x: 23, y: 0, z: 23}, "fly": true },
						{ "item": "tcs_cba:royal_mansion", "name": "Royal Mansion", "size": 41, "height": 45, "offset": {x: 23, y: 0, z: 33}, "fly": true },
						{ "item": "tcs_cba:country_mansion", "name": "Country Mansion", "size": 29, "height": 20, "fly": true },
						{ "item": "tcs_cba:medieval_mansion", "name": "Medieval Mansion", "size": 29, "height": 35, "fly": true },

						{ "item": "tcs_cba:nether_castle", "name": "Nether Castle", "size": 49, "height": 59, "offset": {x: 19, y: 0, z: 48}, "fly": true },
						{ "item": "tcs_cba:ice_castle", "name": "Ice Castle", "size": 49, "height": 86, "offset": {x: 24, y: 0, z: 47}, "fly": true },
						{ "item": "tcs_cba:haunted_castle", "name": "Haunted Castle", "size": 49, "height": 66, "offset": {x: 24, y: 0, z: 48}, "fly": true },
						{ "item": "tcs_cba:ender_castle", "name": "Ender Castle", "size": 49, "height": 56, "offset": {x: 24, y: 0, z: 46}, "fly": true },
						{ "item": "tcs_cba:sand_castle", "name": "Sand Castle", "size": 49, "height": 56, "offset": {x: 24, y: 0, z: 46}, "fly": true  },

						{ "item": "tcs_cba:warden_statue", "name": "Warden Statue", "size": 49, "height": 80, "offset": {x: 24, y: 0, z: 35}, "fly": true },
						{ "item": "tcs_cba:witch_statue", "name": "Witch Statue", "size": 49, "height": 93, "offset": {x: 23, y: 0, z: 34}, "fly": true },
						{ "item": "tcs_cba:iron_golem_statue", "name": "Iron Golem Statue", "size": 49, "height": 68, "offset": {x: 16, y: 0, z: 42}, "fly": true },
						{ "item": "tcs_cba:sheep_statue", "name": "Sheep Statue", "size": 49, "height": 40,  "offset": {x: 26, y: 0, z: 48}, "fly": true },
						{ "item": "tcs_cba:zombie_statue", "name": "Zombie Statue", "size": 49, "height": 94,  "offset": {x: 24, y: 0, z: 27}, "fly": true },
						{ "item": "tcs_cba:villager_statue", "name": "Vilager Statue", "size": 29, "height": 27, "offset": {x: 15, y: 0, z: 21}, "fly": true },

						{ "item": "tcs_cba:construction_crane", "name": "Construction Crane", "size": 21, "height": 27, "fly": true },
						{ "item": "tcs_cba:dump_truck", "name": "Dump Truck", "size": 15, "height": 10 },
						{ "item": "tcs_cba:holiday_tree", "name": "Holiday Tree", "size": 21, "height": 33, "fly": true },
						{ "item": "tcs_cba:magical_mushroom", "name": "Magical Mushroom", "size": 21, "height": 21 },
						{ "item": "tcs_cba:creeper_head", "name": "Creeper Head", "size": 15, "height": 10 },
						{ "item": "tcs_cba:big_well", "name": "Big Well", "size": 15, "height": 12 },
						{ "item": "tcs_cba:small_well", "name": "Small Well", "size": 9, "height": 8 },
						{ "item": "tcs_cba:market_shop", "name": "Market Shop", "size": 15, "height": 7 },
						{ "item": "tcs_cba:campsite", "name": "Campsite", "size": 21, "height": 10, "offset": { x: 10, y: 1, z: 24 } },
						{ "item": "tcs_cba:small_tree", "name": "Small Tree", "size": 15, "height": 27, "fly": true },
						{ "item": "tcs_cba:big_tree", "name": "Big Tree", "size": 15, "height": 42, "fly": true },
						{ "item": "tcs_cba:lucky_block", "name": "Lucky Block", "size": 15, "height": 14 },
						{ "item": "tcs_cba:big_fountain", "name": "Big Fountain", "size": 25, "height": 18 },
						{ "item": "tcs_cba:small_fountain", "name": "Small Fountain", "size": 15, "height": 18 },
						{ "item": "tcs_cba:small_garden", "name": "Small Garden", "size": 9, "height": 8 },
						{ "item": "tcs_cba:big_garden", "name": "Big Garden", "size": 15, "height": 13 },
						{ "item": "tcs_cba:red_flower", "name": "Red Flower", "size": 9, "height": 15 },
						{ "item": "tcs_cba:dragon_head", "name": "Dragon Head", "size": 21, "height": 24, "fly": true },


						{ "item": "tcs_cba:secret_lava_base", "name": "Secret Lava Base", "size": 49, "height": 37, "offset": {x: 22, y: 26, z: 37}  },
						{ "item": "tcs_cba:secret_water_base", "name": "Secret Water Base", "size": 49, "height": 36, "offset": {x: 31, y: 25, z: 36} },
						{ "item": "tcs_cba:secret_mountain_base", "name": "Secret Mountain Base", "size": 49, "height": 35, "offset": {x: 25, y: 25, z: 39}  },
						{ "item": "tcs_cba:secret_ice_base", "name": "Secret Ice Base", "size": 49, "height": 45, "offset": {x: 25, y: 25, z: 27}  },
						{ "item": "tcs_cba:secret_end_base", "name": "Secret End Base", "size": 49, "height": 38, "offset": {x: 21, y: 25, z: 29} },

						{ "item": "tcs_cba:world_safest_house", "name": "World's Safest House", "size": 49, "height": 17, "offset": {x: 24, y: 0, z: 48}, "fly": true },
						{ "item": "tcs_cba:world_safest_tower", "name": "World's Safest Tower", "size": 49, "height": 50, "offset": {x: 24, y: 0, z: 48}, "fly": true  },
						{ "item": "tcs_cba:world_safest_mansion", "name": "World's Safest Mansion", "size": 49, "height": 26, "offset": {x: 24, y: 4, z: 46}, "fly": true },
						{ "item": "tcs_cba:world_safest_bunker", "name": "World's Safest Bunker", "size": 49, "height": 22, "offset": {x: 24, y: 0, z: 48}, "fly": true },
						{ "item": "tcs_cba:world_safest_castle", "name": "World's Safest Castle", "size": 49, "height": 23, "offset": {x: 24, y: 0, z: 47}, "fly": true }
					];



export function getData(baseId)
{
	let baseIndex = data.findIndex((element) => element.item === baseId);
	return data[baseIndex];
}

function getSize(size)
{
	if (size < baseSize.small) return "Small";
	if (size < baseSize.average) return "Average";
	if (size < baseSize.big) return "Big";
	return "Very big";
}
function getHeight(height)
{
	if (height < baseHeight.small) return "Low";
	if (height < baseHeight.average) return "Average";
	if (height < baseHeight.high) return "High";
	return "Very high";
}

export const load = { "north": { NW: { x: -1, y:0, z:-3}, SE: {x: 1, y: 1, z: 0}, degrees: 0, facing: Vector3.South,
									border: Vector3.North, text: {x: 0, y: 2, z: -2}, yes: { x: -1, y: 0, z: -3}, no: { x: 1, y: 0, z: -3} },
						"east": { NW: { x: 0, y:0, z:-1}, SE: {x: 3, y: 1, z: 1}, degrees: 90, facing: Vector3.West,
									border: Vector3.East, text: {x: 2, y: 2, z: 0}, yes: { x: 3, y: 0, z: -1}, no: { x: 3, y: 0, z: 1} },
						"south": { NW: { x: -1, y:0, z:0}, SE: {x: 1, y: 1, z: 3}, degrees: 180,  facing: Vector3.North,
									border: Vector3.South, text: {x: 0, y: 2, z: 2}, yes: { x: 1, y: 0, z: 3}, no: { x: -1, y: 0, z: 3} },
						"west": { NW: { x: -3, y:0, z:-1}, SE: {x: 0, y: 1, z: 1}, degrees: 270, facing: Vector3.East,
									border: Vector3.West, text: {x: -2, y: 2, z: 0}, yes: { x: -3, y: 0, z: 1}, no: { x: -3, y: 0, z: -1} }
						}


