package net.mcreator.cawezsmantletostratus.procedures;

import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
import net.minecraft.world.level.block.Rotation;
import net.minecraft.world.level.block.Mirror;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.core.BlockPos;

public class BaseGroundBlockAddedProcedure {
	public static void execute(LevelAccessor world, double x, double y, double z) {
		if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:buriedwetlandcaves"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_vechny_dragon"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -2, y + -1, z + -7), BlockPos.containing(x + -2, y + -1, z + -7), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:cliffs"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_dragos"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -13, y + -8, z + -12), BlockPos.containing(x + -13, y + -8, z + -12),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:clouds"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_dragos_windmill"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -9, y + -1, z + -6), BlockPos.containing(x + -9, y + -1, z + -6), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:crystals"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_camille_eglise"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -14, y + -1, z + -17), BlockPos.containing(x + -14, y + -1, z + -17),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:dry"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_julian_ruins"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -7, y + -2, z + -16), BlockPos.containing(x + -7, y + -2, z + -16),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:exhumed"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_vechny_trap"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -8, y + -2, z + -6), BlockPos.containing(x + -8, y + -2, z + -6), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:flipped_cherries"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_victor_sky"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + 0, y + -100, z + 0), BlockPos.containing(x + 0, y + -100, z + 0), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:frozencaves"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_vechny_viking"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -6, y + -1, z + -10), BlockPos.containing(x + -6, y + -1, z + -10),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:mushrooms"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_julian_bridge"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -24, y + -3, z + -10), BlockPos.containing(x + -24, y + -3, z + -10),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:overgrowncaves"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_julian_ruins"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -7, y + -2, z + -16), BlockPos.containing(x + -7, y + -2, z + -16),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:stars"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_victor_ovni"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + 0, y + -100, z + 0), BlockPos.containing(x + 0, y + -100, z + 0), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:supersized"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_vechny_lesbo"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -4, y + 0, z + -4), BlockPos.containing(x + -4, y + 0, z + -4), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:trees"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_julian"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -17, y + -3, z + -14), BlockPos.containing(x + -17, y + -3, z + -14),
							new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false), _serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:volcano"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_vechny_dragon"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + -2, y + -1, z + -7), BlockPos.containing(x + -2, y + -1, z + -7), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		} else if (world.getBiome(BlockPos.containing(x, y, z)).is(ResourceLocation.parse("cawezs_mantle_to_stratus:windsweptpillars"))) {
			if (world instanceof ServerLevel _serverworld) {
				StructureTemplate template = _serverworld.getStructureManager().getOrCreate(ResourceLocation.fromNamespaceAndPath("cawezs_mantle_to_stratus", "base_victor_sky"));
				if (template != null) {
					template.placeInWorld(_serverworld, BlockPos.containing(x + 0, y + -100, z + 0), BlockPos.containing(x + 0, y + -100, z + 0), new StructurePlaceSettings().setRotation(Rotation.NONE).setMirror(Mirror.NONE).setIgnoreEntities(false),
							_serverworld.random, 3);
				}
			}
		}
	}
}
