public static StructureBoundingBox Func_35051_a(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, 4, par5); StructureComponent structurecomponent = StructureComponent.FindIntersecting(par0List, structureboundingbox); if (structurecomponent == null) { return(null); } if (structurecomponent.GetBoundingBox().MinY == structureboundingbox.MinY) { for (int i = 3; i >= 1; i--) { StructureBoundingBox structureboundingbox1 = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, i - 1, par5); if (!structurecomponent.GetBoundingBox().IntersectsWith(structureboundingbox1)) { return(StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, i, par5)); } } } return(null); }
public static ComponentStrongholdStairsStraight FindValidPlacement(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5, int par6) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -1, -7, 0, 5, 11, 8, par5); if (!CanStrongholdGoDeeper(structureboundingbox) || StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } else { return(new ComponentStrongholdStairsStraight(par6, par1Random, structureboundingbox, par5)); } }
/// <summary> /// Creates and returns a new component piece. Or null if it could not find enough room to place it. /// </summary> public static ComponentNetherBridgeCrossing2 CreateValidComponent(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5, int par6) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -1, 0, 0, 5, 7, 5, par5); if (!IsAboveGround(structureboundingbox) || StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } else { return(new ComponentNetherBridgeCrossing2(par6, par1Random, structureboundingbox, par5)); } }
/// <summary> /// Trys to find a valid place to put this component. /// </summary> public static ComponentVillageChurch FindValidPlacement(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5, int par6) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, 0, 0, 0, 5, 12, 9, par5); if (!CanVillageGoDeeper(structureboundingbox) || StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } else { return(new ComponentVillageChurch(par6, par1Random, structureboundingbox, par5)); } }
/// <summary> /// Trys to find a valid place to put this component. /// </summary> public static StructureBoundingBox FindValidPlacement(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, 0, 0, 0, 3, 4, 2, par5); if (StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } else { return(structureboundingbox); } }
public static ComponentNetherBridgeEnd Func_40023_a(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5, int par6) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -1, -3, 0, 5, 10, 8, par5); if (!IsAboveGround(structureboundingbox) || StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } else { return(new ComponentNetherBridgeEnd(par6, par1Random, structureboundingbox, par5)); } }
public static ComponentVillageHouse4_Garden FindValidPlacement(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5, int par6) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, 0, 0, 0, 5, 6, 5, par5); if (StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } else { return(new ComponentVillageHouse4_Garden(par6, par1Random, structureboundingbox, par5)); } }
public static StructureBoundingBox Func_35087_a(ComponentVillageStartPiece par0ComponentVillageStartPiece, List <StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, int par6) { for (int i = 7 * MathHelper2.GetRandomIntegerInRange(par2Random, 3, 5); i >= 7; i -= 7) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 3, 3, i, par6); if (StructureComponent.FindIntersecting(par1List, structureboundingbox) == null) { return(structureboundingbox); } } return(null); }
public static ComponentStrongholdLibrary FindValidPlacement(List <StructureComponent> par0List, Random par1Random, int par2, int par3, int par4, int par5, int par6) { StructureBoundingBox structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -4, -1, 0, 14, 11, 15, par5); if (!CanStrongholdGoDeeper(structureboundingbox) || StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { structureboundingbox = StructureBoundingBox.GetComponentToAddBoundingBox(par2, par3, par4, -4, -1, 0, 14, 6, 15, par5); if (!CanStrongholdGoDeeper(structureboundingbox) || StructureComponent.FindIntersecting(par0List, structureboundingbox) != null) { return(null); } } return(new ComponentStrongholdLibrary(par6, par1Random, structureboundingbox, par5)); }