/// <summary> /// 'Initiates construction of the Structure Component picked, at the current Location of StructGen' /// </summary> public override void BuildComponent(StructureComponent par1StructureComponent, List <StructureComponent> par2List, Random par3Random) { if (Field_35036_a) { StructureStrongholdPieces.SetComponentType(typeof(net.minecraft.src.ComponentStrongholdCrossing)); } GetNextComponentNormal((ComponentStrongholdStairs2)par1StructureComponent, par2List, par3Random, 1, 1); }
public StructureStrongholdStart(World par1World, Random par2Random, int par3, int par4) { StructureStrongholdPieces.PrepareStructurePieces(); ComponentStrongholdStairs2 componentstrongholdstairs2 = new ComponentStrongholdStairs2(0, par2Random, (par3 << 4) + 2, (par4 << 4) + 2); Components.Add(componentstrongholdstairs2); componentstrongholdstairs2.BuildComponent(componentstrongholdstairs2, Components, par2Random); StructureComponent structurecomponent; for (List<StructureComponent> arraylist = componentstrongholdstairs2.Field_35037_b; arraylist.Count > 0; structurecomponent.BuildComponent(componentstrongholdstairs2, Components, par2Random)) { int i = par2Random.Next(arraylist.Count); structurecomponent = arraylist[i]; arraylist.RemoveAt(i); } UpdateBoundingBox(); MarkAvailableHeight(par1World, par2Random, 10); }
/// <summary> /// Gets the next component in any cardinal direction /// </summary> protected virtual StructureComponent GetNextComponentNormal(ComponentStrongholdStairs2 par1ComponentStrongholdStairs2, List <StructureComponent> par2List, Random par3Random, int par4, int par5) { switch (CoordBaseMode) { case 2: return(StructureStrongholdPieces.GetNextValidComponentAccess(par1ComponentStrongholdStairs2, par2List, par3Random, BoundingBox.MinX + par4, BoundingBox.MinY + par5, BoundingBox.MinZ - 1, CoordBaseMode, GetComponentType())); case 0: return(StructureStrongholdPieces.GetNextValidComponentAccess(par1ComponentStrongholdStairs2, par2List, par3Random, BoundingBox.MinX + par4, BoundingBox.MinY + par5, BoundingBox.MaxZ + 1, CoordBaseMode, GetComponentType())); case 1: return(StructureStrongholdPieces.GetNextValidComponentAccess(par1ComponentStrongholdStairs2, par2List, par3Random, BoundingBox.MinX - 1, BoundingBox.MinY + par5, BoundingBox.MinZ + par4, CoordBaseMode, GetComponentType())); case 3: return(StructureStrongholdPieces.GetNextValidComponentAccess(par1ComponentStrongholdStairs2, par2List, par3Random, BoundingBox.MaxX + 1, BoundingBox.MinY + par5, BoundingBox.MinZ + par4, CoordBaseMode, GetComponentType())); } return(null); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 10, 7, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 1, 7, 0); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, EnumDoor.OPENING, 1, 1, 7); int i = GetMetadataWithOffset(Block.StairCompactCobblestone.BlockID, 2); for (int j = 0; j < 6; j++) { PlaceBlockAtCurrentPosition(par1World, Block.StairCompactCobblestone.BlockID, i, 1, 6 - j, 1 + j, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairCompactCobblestone.BlockID, i, 2, 6 - j, 1 + j, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairCompactCobblestone.BlockID, i, 3, 6 - j, 1 + j, par3StructureBoundingBox); if (j < 5) { PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 1, 5 - j, 1 + j, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 2, 5 - j, 1 + j, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3, 5 - j, 1 + j, par3StructureBoundingBox); } } return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 10, 7, 15, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, EnumDoor.GRATES, 4, 1, 0); sbyte byte0 = 6; FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, byte0, 1, 1, byte0, 14, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 9, byte0, 1, 9, byte0, 14, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, byte0, 1, 8, byte0, 2, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 2, byte0, 14, 8, byte0, 14, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 1, 1, 2, 1, 4, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 8, 1, 1, 9, 1, 4, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithBlocks(par1World, par3StructureBoundingBox, 1, 1, 1, 1, 1, 3, Block.LavaMoving.BlockID, Block.LavaMoving.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 9, 1, 1, 9, 1, 3, Block.LavaMoving.BlockID, Block.LavaMoving.BlockID, false); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 3, 1, 8, 7, 1, 12, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 1, 9, 6, 1, 11, Block.LavaMoving.BlockID, Block.LavaMoving.BlockID, false); for (int j = 3; j < 14; j += 2) { FillWithBlocks(par1World, par3StructureBoundingBox, 0, 3, j, 0, 4, j, Block.FenceIron.BlockID, Block.FenceIron.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 10, 3, j, 10, 4, j, Block.FenceIron.BlockID, Block.FenceIron.BlockID, false); } for (int k = 2; k < 9; k += 2) { FillWithBlocks(par1World, par3StructureBoundingBox, k, 3, 15, k, 4, 15, Block.FenceIron.BlockID, Block.FenceIron.BlockID, false); } int l = GetMetadataWithOffset(Block.StairsStoneBrickSmooth.BlockID, 3); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 5, 6, 1, 7, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 2, 6, 6, 2, 7, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 3, 7, 6, 3, 7, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); for (int i1 = 4; i1 <= 6; i1++) { PlaceBlockAtCurrentPosition(par1World, Block.StairsStoneBrickSmooth.BlockID, l, i1, 1, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairsStoneBrickSmooth.BlockID, l, i1, 2, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairsStoneBrickSmooth.BlockID, l, i1, 3, 6, par3StructureBoundingBox); } sbyte byte1 = 2; sbyte byte2 = 0; sbyte byte3 = 3; sbyte byte4 = 1; switch (CoordBaseMode) { case 0: byte1 = 0; byte2 = 2; break; case 3: byte1 = 3; byte2 = 1; byte3 = 0; byte4 = 2; break; case 1: byte1 = 1; byte2 = 3; byte3 = 0; byte4 = 2; break; } PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte1 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 4, 3, 8, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte1 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 5, 3, 8, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte1 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 6, 3, 8, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte2 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 4, 3, 12, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte2 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 5, 3, 12, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte2 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 6, 3, 12, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte3 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 3, 3, 9, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte3 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 3, 3, 10, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte3 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 3, 3, 11, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte4 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 7, 3, 9, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte4 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 7, 3, 10, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.EndPortalFrame.BlockID, byte4 + (par2Random.NextFloat() <= 0.9F ? 0 : 4), 7, 3, 11, par3StructureBoundingBox); if (!HasSpawner) { int i = GetYWithOffset(3); int j1 = GetXWithOffset(5, 6); int k1 = GetZWithOffset(5, 6); if (par3StructureBoundingBox.IsVecInside(j1, i, k1)) { HasSpawner = true; par1World.SetBlockWithNotify(j1, i, k1, Block.MobSpawner.BlockID); TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner)par1World.GetBlockTileEntity(j1, i, k1); if (tileentitymobspawner != null) { tileentitymobspawner.SetMobID("Silverfish"); } } } return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 4, 6, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 1, 1, 0); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, EnumDoor.OPENING, 1, 1, 6); FillWithBlocks(par1World, par3StructureBoundingBox, 3, 1, 2, 3, 1, 4, Block.StoneBrick.BlockID, Block.StoneBrick.BlockID, false); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 5, 3, 1, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 5, 3, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 5, 3, 2, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 5, 3, 2, 4, par3StructureBoundingBox); for (int i = 2; i <= 4; i++) { PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 5, 2, 1, i, par3StructureBoundingBox); } if (!HasMadeChest) { int j = GetYWithOffset(2); int k = GetXWithOffset(3, 3); int l = GetZWithOffset(3, 3); if (par3StructureBoundingBox.IsVecInside(k, j, l)) { HasMadeChest = true; CreateTreasureChestAtCurrentPosition(par1World, par3StructureBoundingBox, par2Random, 3, 2, 3, ChestLoot, 2 + par2Random.Next(2)); } } return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } sbyte byte0 = 11; if (!IsLargeRoom) { byte0 = 6; } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 13, byte0 - 1, 14, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 4, 1, 0); RandomlyFillWithBlocks(par1World, par3StructureBoundingBox, par2Random, 0.07F, 2, 1, 1, 11, 4, 13, Block.Web.BlockID, Block.Web.BlockID, false); for (int i = 1; i <= 13; i++) { if ((i - 1) % 4 == 0) { FillWithBlocks(par1World, par3StructureBoundingBox, 1, 1, i, 1, 4, i, Block.Planks.BlockID, Block.Planks.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 12, 1, i, 12, 4, i, Block.Planks.BlockID, Block.Planks.BlockID, false); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 2, 3, i, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 11, 3, i, par3StructureBoundingBox); if (IsLargeRoom) { FillWithBlocks(par1World, par3StructureBoundingBox, 1, 6, i, 1, 9, i, Block.Planks.BlockID, Block.Planks.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 12, 6, i, 12, 9, i, Block.Planks.BlockID, Block.Planks.BlockID, false); } continue; } FillWithBlocks(par1World, par3StructureBoundingBox, 1, 1, i, 1, 4, i, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 12, 1, i, 12, 4, i, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); if (IsLargeRoom) { FillWithBlocks(par1World, par3StructureBoundingBox, 1, 6, i, 1, 9, i, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 12, 6, i, 12, 9, i, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); } } for (int j = 3; j < 12; j += 2) { FillWithBlocks(par1World, par3StructureBoundingBox, 3, 1, j, 4, 3, j, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 6, 1, j, 7, 3, j, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 9, 1, j, 10, 3, j, Block.BookShelf.BlockID, Block.BookShelf.BlockID, false); } if (IsLargeRoom) { FillWithBlocks(par1World, par3StructureBoundingBox, 1, 5, 1, 3, 5, 13, Block.Planks.BlockID, Block.Planks.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 10, 5, 1, 12, 5, 13, Block.Planks.BlockID, Block.Planks.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 5, 1, 9, 5, 2, Block.Planks.BlockID, Block.Planks.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 5, 12, 9, 5, 13, Block.Planks.BlockID, Block.Planks.BlockID, false); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 9, 5, 11, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 8, 5, 11, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 9, 5, 10, par3StructureBoundingBox); FillWithBlocks(par1World, par3StructureBoundingBox, 3, 6, 2, 3, 6, 12, Block.Fence.BlockID, Block.Fence.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 10, 6, 2, 10, 6, 10, Block.Fence.BlockID, Block.Fence.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 6, 2, 9, 6, 2, Block.Fence.BlockID, Block.Fence.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 6, 12, 8, 6, 12, Block.Fence.BlockID, Block.Fence.BlockID, false); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, 9, 6, 11, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, 8, 6, 11, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, 9, 6, 10, par3StructureBoundingBox); int k = GetMetadataWithOffset(Block.Ladder.BlockID, 3); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 1, 13, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 2, 13, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 3, 13, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 4, 13, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 5, 13, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 6, 13, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, k, 10, 7, 13, par3StructureBoundingBox); sbyte byte1 = 7; sbyte byte2 = 7; PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 - 1, 9, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1, 9, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 - 1, 8, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1, 8, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 - 1, 7, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1, 7, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 - 2, 7, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 + 1, 7, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 - 1, 7, byte2 - 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1 - 1, 7, byte2 + 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1, 7, byte2 - 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Fence.BlockID, 0, byte1, 7, byte2 + 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, byte1 - 2, 8, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, byte1 + 1, 8, byte2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, byte1 - 1, 8, byte2 - 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, byte1 - 1, 8, byte2 + 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, byte1, 8, byte2 - 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, byte1, 8, byte2 + 1, par3StructureBoundingBox); } CreateTreasureChestAtCurrentPosition(par1World, par3StructureBoundingBox, par2Random, 3, 3, 5, Field_35056_b, 1 + par2Random.Next(4)); if (IsLargeRoom) { PlaceBlockAtCurrentPosition(par1World, 0, 0, 12, 9, 1, par3StructureBoundingBox); CreateTreasureChestAtCurrentPosition(par1World, par3StructureBoundingBox, par2Random, 12, 8, 1, Field_35056_b, 1 + par2Random.Next(4)); } return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 9, 8, 10, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 4, 3, 0); if (Field_35042_b) { FillWithBlocks(par1World, par3StructureBoundingBox, 0, 3, 1, 0, 5, 3, 0, 0, false); } if (Field_35040_d) { FillWithBlocks(par1World, par3StructureBoundingBox, 9, 3, 1, 9, 5, 3, 0, 0, false); } if (Field_35043_c) { FillWithBlocks(par1World, par3StructureBoundingBox, 0, 5, 7, 0, 7, 9, 0, 0, false); } if (Field_35041_e) { FillWithBlocks(par1World, par3StructureBoundingBox, 9, 5, 7, 9, 7, 9, 0, 0, false); } FillWithBlocks(par1World, par3StructureBoundingBox, 5, 1, 10, 7, 3, 10, 0, 0, false); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 2, 1, 8, 2, 6, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 5, 4, 4, 9, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 8, 1, 5, 8, 4, 9, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 4, 7, 3, 4, 9, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 1, 3, 5, 3, 3, 6, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithBlocks(par1World, par3StructureBoundingBox, 1, 3, 4, 3, 3, 4, Block.StairSingle.BlockID, Block.StairSingle.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 1, 4, 6, 3, 4, 6, Block.StairSingle.BlockID, Block.StairSingle.BlockID, false); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 5, 1, 7, 7, 1, 8, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithBlocks(par1World, par3StructureBoundingBox, 5, 1, 9, 7, 1, 9, Block.StairSingle.BlockID, Block.StairSingle.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 5, 2, 7, 7, 2, 7, Block.StairSingle.BlockID, Block.StairSingle.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 5, 7, 4, 5, 9, Block.StairSingle.BlockID, Block.StairSingle.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 8, 5, 7, 8, 5, 9, Block.StairSingle.BlockID, Block.StairSingle.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 5, 5, 7, 7, 5, 9, Block.StairDouble.BlockID, Block.StairDouble.BlockID, false); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 6, 5, 6, par3StructureBoundingBox); return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } else { FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 8, 4, 10, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 1, 1, 0); FillWithBlocks(par1World, par3StructureBoundingBox, 1, 1, 10, 3, 3, 10, 0, 0, false); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 1, 4, 3, 1, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 3, 4, 3, 3, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 7, 4, 3, 7, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 4, 1, 9, 4, 3, 9, false, par2Random, StructureStrongholdPieces.GetStrongholdStones()); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 1, 4, 4, 3, 6, Block.FenceIron.BlockID, Block.FenceIron.BlockID, false); FillWithBlocks(par1World, par3StructureBoundingBox, 5, 1, 5, 7, 3, 5, Block.FenceIron.BlockID, Block.FenceIron.BlockID, false); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, 4, 3, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.FenceIron.BlockID, 0, 4, 3, 8, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorSteel.BlockID, GetMetadataWithOffset(Block.DoorSteel.BlockID, 3), 4, 1, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorSteel.BlockID, GetMetadataWithOffset(Block.DoorSteel.BlockID, 3) + 8, 4, 2, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorSteel.BlockID, GetMetadataWithOffset(Block.DoorSteel.BlockID, 3), 4, 1, 8, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.DoorSteel.BlockID, GetMetadataWithOffset(Block.DoorSteel.BlockID, 3) + 8, 4, 2, 8, par3StructureBoundingBox); return(true); } }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 4, 4, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 1, 1, 0); if (CoordBaseMode == 2 || CoordBaseMode == 3) { FillWithBlocks(par1World, par3StructureBoundingBox, 4, 1, 1, 4, 3, 3, 0, 0, false); } else { FillWithBlocks(par1World, par3StructureBoundingBox, 0, 1, 1, 0, 3, 3, 0, 0, false); } return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } else { if (!Field_35036_a) { ; } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 10, 4, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 1, 7, 0); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, EnumDoor.OPENING, 1, 1, 4); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 2, 6, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 1, 5, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 1, 6, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 1, 5, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 1, 4, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 1, 5, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 2, 4, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3, 3, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 3, 4, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3, 3, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3, 2, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 3, 3, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 2, 2, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 1, 1, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 1, 2, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 1, 1, 2, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 1, 1, 3, par3StructureBoundingBox); return(true); } }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 4, 4, 6, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 1, 1, 0); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, EnumDoor.OPENING, 1, 1, 6); RandomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.1F, 1, 2, 1, Block.TorchWood.BlockID, 0); RandomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.1F, 3, 2, 1, Block.TorchWood.BlockID, 0); RandomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.1F, 1, 2, 5, Block.TorchWood.BlockID, 0); RandomlyPlaceBlock(par1World, par3StructureBoundingBox, par2Random, 0.1F, 3, 2, 5, Block.TorchWood.BlockID, 0); if (ExpandsX) { FillWithBlocks(par1World, par3StructureBoundingBox, 0, 1, 2, 0, 3, 4, 0, 0, false); } if (ExpandsZ) { FillWithBlocks(par1World, par3StructureBoundingBox, 4, 1, 2, 4, 3, 4, 0, 0, false); } return(true); }
/// <summary> /// 'second Part of Structure generating, this for example places Spiderwebs, Mob Spawners, it closes Mineshafts at /// the end, it adds Fences...' /// </summary> public override bool AddComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox) { if (IsLiquidInStructureBoundingBox(par1World, par3StructureBoundingBox)) { return(false); } FillWithRandomizedBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 10, 6, 10, true, par2Random, StructureStrongholdPieces.GetStrongholdStones()); PlaceDoor(par1World, par2Random, par3StructureBoundingBox, DoorType, 4, 1, 0); FillWithBlocks(par1World, par3StructureBoundingBox, 4, 1, 10, 6, 3, 10, 0, 0, false); FillWithBlocks(par1World, par3StructureBoundingBox, 0, 1, 4, 0, 3, 6, 0, 0, false); FillWithBlocks(par1World, par3StructureBoundingBox, 10, 1, 4, 10, 3, 6, 0, 0, false); switch (RoomType) { default: break; case 0: PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 5, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 5, 2, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 5, 3, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 4, 3, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 6, 3, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 5, 3, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 5, 3, 6, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 4, 1, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 4, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 4, 1, 6, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 6, 1, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 6, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 6, 1, 6, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 5, 1, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StairSingle.BlockID, 0, 5, 1, 6, par3StructureBoundingBox); break; case 1: for (int i = 0; i < 5; i++) { PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3, 1, 3 + i, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 7, 1, 3 + i, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3 + i, 1, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 3 + i, 1, 7, par3StructureBoundingBox); } PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 5, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 5, 2, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.StoneBrick.BlockID, 0, 5, 3, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.WaterMoving.BlockID, 0, 5, 4, 5, par3StructureBoundingBox); break; case 2: for (int j = 1; j <= 9; j++) { PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 1, 3, j, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 9, 3, j, par3StructureBoundingBox); } for (int k = 1; k <= 9; k++) { PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, k, 3, 1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, k, 3, 9, par3StructureBoundingBox); } PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 5, 1, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 5, 1, 6, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 5, 3, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 5, 3, 6, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 4, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 6, 1, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 4, 3, 5, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 6, 3, 5, par3StructureBoundingBox); for (int l = 1; l <= 3; l++) { PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 4, l, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 6, l, 4, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 4, l, 6, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Cobblestone.BlockID, 0, 6, l, 6, par3StructureBoundingBox); } PlaceBlockAtCurrentPosition(par1World, Block.TorchWood.BlockID, 0, 5, 3, 5, par3StructureBoundingBox); for (int i1 = 2; i1 <= 8; i1++) { PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 2, 3, i1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 3, 3, i1, par3StructureBoundingBox); if (i1 <= 3 || i1 >= 7) { PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 4, 3, i1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 5, 3, i1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 6, 3, i1, par3StructureBoundingBox); } PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 7, 3, i1, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Planks.BlockID, 0, 8, 3, i1, par3StructureBoundingBox); } PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, GetMetadataWithOffset(Block.Ladder.BlockID, 4), 9, 1, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, GetMetadataWithOffset(Block.Ladder.BlockID, 4), 9, 2, 3, par3StructureBoundingBox); PlaceBlockAtCurrentPosition(par1World, Block.Ladder.BlockID, GetMetadataWithOffset(Block.Ladder.BlockID, 4), 9, 3, 3, par3StructureBoundingBox); CreateTreasureChestAtCurrentPosition(par1World, par3StructureBoundingBox, par2Random, 3, 4, 8, ChestLoot, 1 + par2Random.Next(4)); break; } return(true); }