public ComponentStrongholdChestCorridor(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1) { CoordBaseMode = par4; DoorType = GetRandomDoor(par2Random); BoundingBox = par3StructureBoundingBox; }
public Door(/*EnumDoor enumDoor = EnumDoor.glass*/) { EnumDoor enumDoor; Console.WriteLine("Choose the type of door."); Console.WriteLine("1 - glass,\n2 - metal,\n3 - wooden,\n4 - profile."); int choose = int.Parse(Console.ReadLine()); if (choose == 1) { enumDoor = EnumDoor.glass; this.enumDoor = enumDoor; } if (choose == 2) { enumDoor = EnumDoor.metal; this.enumDoor = enumDoor; } if (choose == 3) { enumDoor = EnumDoor.wooden; this.enumDoor = enumDoor; } if (choose == 4) { enumDoor = EnumDoor.profile; this.enumDoor = enumDoor; } else { Console.WriteLine("You have chosen the wrong number!!!"); } }
public ComponentStrongholdStairs(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1) { Field_35036_a = false; CoordBaseMode = par4; DoorType = GetRandomDoor(par2Random); BoundingBox = par3StructureBoundingBox; }
public ComponentStrongholdLibrary(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1) { CoordBaseMode = par4; DoorType = GetRandomDoor(par2Random); BoundingBox = par3StructureBoundingBox; IsLargeRoom = par3StructureBoundingBox.GetYSize() > 6; }
public ComponentStrongholdStraight(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1) { CoordBaseMode = par4; DoorType = GetRandomDoor(par2Random); BoundingBox = par3StructureBoundingBox; ExpandsX = par2Random.Next(2) == 0; ExpandsZ = par2Random.Next(2) == 0; }
public ComponentStrongholdRoomCrossing(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1) { CoordBaseMode = par4; DoorType = GetRandomDoor(par2Random); BoundingBox = par3StructureBoundingBox; RoomType = par2Random.Next(5); }
public ComponentStrongholdCrossing(int par1, Random par2Random, StructureBoundingBox par3StructureBoundingBox, int par4) : base(par1) { CoordBaseMode = par4; DoorType = GetRandomDoor(par2Random); BoundingBox = par3StructureBoundingBox; Field_35042_b = par2Random.NextBool(); Field_35043_c = par2Random.NextBool(); Field_35040_d = par2Random.NextBool(); Field_35041_e = par2Random.Next(3) > 0; }
public ComponentStrongholdStairs(int par1, Random par2Random, int par3, int par4) : base(par1) { Field_35036_a = true; CoordBaseMode = par2Random.Next(4); DoorType = EnumDoor.OPENING; switch (CoordBaseMode) { case 0: case 2: BoundingBox = new StructureBoundingBox(par3, 64, par4, (par3 + 5) - 1, 74, (par4 + 5) - 1); break; default: BoundingBox = new StructureBoundingBox(par3, 64, par4, (par3 + 5) - 1, 74, (par4 + 5) - 1); break; } }
/// <summary> /// 'builds a door of the enumerated types (empty opening is a door)' /// </summary> protected virtual void PlaceDoor(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox, EnumDoor par4EnumDoor, int par5, int par6, int par7) { switch (par4EnumDoor) { case EnumDoor.OPENING: default: FillWithBlocks(par1World, par3StructureBoundingBox, par5, par6, par7, (par5 + 3) - 1, (par6 + 3) - 1, par7, 0, 0, false); break; case EnumDoor.WOOD_DOOR: PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 1, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 2, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 2, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 2, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorWood.BlockID, 0, par5 + 1, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorWood.BlockID, 8, par5 + 1, par6 + 1, par7, par3StructureBoundingBox); break; case EnumDoor.GRATES: PlaceBlockAtCurrentPosition(par1World, 0, 0, par5 + 1, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, 0, 0, par5 + 1, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5 + 1, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5 + 2, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5 + 2, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, par5 + 2, par6, par7, par3StructureBoundingBox); break; case EnumDoor.IRON_DOOR: PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 1, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 2, par6 + 2, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 2, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, par5 + 2, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorSteel.BlockID, 0, par5 + 1, par6, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorSteel.BlockID, 8, par5 + 1, par6 + 1, par7, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Button.BlockID, GetMetadataWithOffset(Block.Button.BlockID, 4), par5 + 2, par6 + 1, par7 + 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Button.BlockID, GetMetadataWithOffset(Block.Button.BlockID, 3), par5 + 2, par6 + 1, par7 - 1, par3StructureBoundingBox); break; } }