StructureOceanMonumentPieces .java

net.minecraft.world.gen.structure.StructureOceanMonumentPieces (class, 2239 lines): members: registerOceanMonumentPieces, FitSimpleRoomTopHelper, WingRoom.

net.minecraft.world.gen.structureclass2,239 linescommon130.4 KB

API Surface (40)

void registerOceanMonumentPieces()
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
int func_175820_a(int p_175820_0_, int p_175820_1_, int p_175820_2_)
void writeStructureToNBT(NBTTagCompound tagCompound)
void readStructureFromNBT(NBTTagCompound tagCompound)
void func_181655_a(World p_181655_1_, StructureBoundingBox p_181655_2_, int p_181655_3_, int p_181655_4_, int p_181655_5_, int p_181655_6_, int p_181655_7_, int p_181655_8_, boolean p_181655_9_)
void func_175821_a(World worldIn, StructureBoundingBox p_175821_2_, int p_175821_3_, int p_175821_4_, boolean p_175821_5_)
void func_175819_a(World worldIn, StructureBoundingBox p_175819_2_, int p_175819_3_, int p_175819_4_, int p_175819_5_, int p_175819_6_, int p_175819_7_, int p_175819_8_, IBlockState p_175819_9_)
boolean func_175818_a(StructureBoundingBox p_175818_1_, int p_175818_2_, int p_175818_3_, int p_175818_4_, int p_175818_5_)
boolean func_175817_a(World worldIn, StructureBoundingBox p_175817_2_, int p_175817_3_, int p_175817_4_, int p_175817_5_)
void func_175957_a(EnumFacing p_175957_1_, StructureOceanMonumentPieces.RoomDefinition p_175957_2_)
void func_175958_a()
boolean func_175959_a(int p_175959_1_)
boolean func_175961_b()
int func_175960_c()
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)

String literals (10)

"OMCR"
"OMDXR"
"OMDXYR"
"OMDYR"
"OMDYZR"
"OMDZR"
"OMEntry"
"OMPenthouse"
"OMSimple"
"OMSimpleT"

Full Source

StructureOceanMonumentPieces.java2239 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.world.gen.structure;
2
3
import com.google.common.collect.Lists;
4
import java.util.Collections;
5
import java.util.Iterator;
6
import java.util.List;
7
import java.util.Random;
8
import net.minecraft.block.BlockPrismarine;
9
import net.minecraft.block.material.Material;
10
import net.minecraft.block.state.IBlockState;
11
import net.minecraft.entity.IEntityLivingData;
12
import net.minecraft.entity.monster.EntityGuardian;
13
import net.minecraft.init.Blocks;
14
import net.minecraft.nbt.NBTTagCompound;
15
import net.minecraft.util.BlockPos;
16
import net.minecraft.util.EnumFacing;
17
import net.minecraft.world.World;
18
19
public class StructureOceanMonumentPieces
20
{
21
    public static void registerOceanMonumentPieces()
22
    {
23
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.MonumentBuilding.class, "OMB");
24
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.MonumentCoreRoom.class, "OMCR");
25
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.DoubleXRoom.class, "OMDXR");
26
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.DoubleXYRoom.class, "OMDXYR");
27
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.DoubleYRoom.class, "OMDYR");
28
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.DoubleYZRoom.class, "OMDYZR");
29
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.DoubleZRoom.class, "OMDZR");
30
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.EntryRoom.class, "OMEntry");
31
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.Penthouse.class, "OMPenthouse");
32
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.SimpleRoom.class, "OMSimple");
33
        MapGenStructureIO.registerStructureComponent(StructureOceanMonumentPieces.SimpleTopRoom.class, "OMSimpleT");
34
    }
35
36
    public static class DoubleXRoom extends StructureOceanMonumentPieces.Piece
37
    {
38
        public DoubleXRoom()
39
        {
40
        }
41
42
        public DoubleXRoom(EnumFacing p_i45597_1_, StructureOceanMonumentPieces.RoomDefinition p_i45597_2_, Random p_i45597_3_)
43
        {
44
            super(1, p_i45597_1_, p_i45597_2_, 2, 1, 1);
45
        }
46
47
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
48
        {
49
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = this.field_175830_k.field_175965_b[EnumFacing.EAST.getIndex()];
50
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition1 = this.field_175830_k;
51
52
            if (this.field_175830_k.field_175967_a / 25 > 0)
53
            {
54
                this.func_175821_a(worldIn, structureBoundingBoxIn, 8, 0, structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.DOWN.getIndex()]);
55
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.DOWN.getIndex()]);
56
            }
57
58
            if (structureoceanmonumentpieces$roomdefinition1.field_175965_b[EnumFacing.UP.getIndex()] == null)
59
            {
60
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 4, 1, 7, 4, 6, field_175828_a);
61
            }
62
63
            if (structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()] == null)
64
            {
65
                this.func_175819_a(worldIn, structureBoundingBoxIn, 8, 4, 1, 14, 4, 6, field_175828_a);
66
            }
67
68
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 0, 3, 7, field_175826_b, field_175826_b, false);
69
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, 3, 0, 15, 3, 7, field_175826_b, field_175826_b, false);
70
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 0, 15, 3, 0, field_175826_b, field_175826_b, false);
71
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 7, 14, 3, 7, field_175826_b, field_175826_b, false);
72
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 2, 7, field_175828_a, field_175828_a, false);
73
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, 2, 0, 15, 2, 7, field_175828_a, field_175828_a, false);
74
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 0, 15, 2, 0, field_175828_a, field_175828_a, false);
75
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 7, 14, 2, 7, field_175828_a, field_175828_a, false);
76
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 0, 1, 7, field_175826_b, field_175826_b, false);
77
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, 1, 0, 15, 1, 7, field_175826_b, field_175826_b, false);
78
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 0, 15, 1, 0, field_175826_b, field_175826_b, false);
79
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 7, 14, 1, 7, field_175826_b, field_175826_b, false);
80
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 0, 10, 1, 4, field_175826_b, field_175826_b, false);
81
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 2, 0, 9, 2, 3, field_175828_a, field_175828_a, false);
82
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 3, 0, 10, 3, 4, field_175826_b, field_175826_b, false);
83
            this.setBlockState(worldIn, field_175825_e, 6, 2, 3, structureBoundingBoxIn);
84
            this.setBlockState(worldIn, field_175825_e, 9, 2, 3, structureBoundingBoxIn);
85
86
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.SOUTH.getIndex()])
87
            {
88
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, false);
89
            }
90
91
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.NORTH.getIndex()])
92
            {
93
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 7, 4, 2, 7, false);
94
            }
95
96
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.WEST.getIndex()])
97
            {
98
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, false);
99
            }
100
101
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.SOUTH.getIndex()])
102
            {
103
                this.func_181655_a(worldIn, structureBoundingBoxIn, 11, 1, 0, 12, 2, 0, false);
104
            }
105
106
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.NORTH.getIndex()])
107
            {
108
                this.func_181655_a(worldIn, structureBoundingBoxIn, 11, 1, 7, 12, 2, 7, false);
109
            }
110
111
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.EAST.getIndex()])
112
            {
113
                this.func_181655_a(worldIn, structureBoundingBoxIn, 15, 1, 3, 15, 2, 4, false);
114
            }
115
116
            return true;
117
        }
118
    }
119
120
    public static class DoubleXYRoom extends StructureOceanMonumentPieces.Piece
121
    {
122
        public DoubleXYRoom()
123
        {
124
        }
125
126
        public DoubleXYRoom(EnumFacing p_i45596_1_, StructureOceanMonumentPieces.RoomDefinition p_i45596_2_, Random p_i45596_3_)
127
        {
128
            super(1, p_i45596_1_, p_i45596_2_, 2, 2, 1);
129
        }
130
131
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
132
        {
133
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = this.field_175830_k.field_175965_b[EnumFacing.EAST.getIndex()];
134
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition1 = this.field_175830_k;
135
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition2 = structureoceanmonumentpieces$roomdefinition1.field_175965_b[EnumFacing.UP.getIndex()];
136
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition3 = structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()];
137
138
            if (this.field_175830_k.field_175967_a / 25 > 0)
139
            {
140
                this.func_175821_a(worldIn, structureBoundingBoxIn, 8, 0, structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.DOWN.getIndex()]);
141
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.DOWN.getIndex()]);
142
            }
143
144
            if (structureoceanmonumentpieces$roomdefinition2.field_175965_b[EnumFacing.UP.getIndex()] == null)
145
            {
146
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 8, 1, 7, 8, 6, field_175828_a);
147
            }
148
149
            if (structureoceanmonumentpieces$roomdefinition3.field_175965_b[EnumFacing.UP.getIndex()] == null)
150
            {
151
                this.func_175819_a(worldIn, structureBoundingBoxIn, 8, 8, 1, 14, 8, 6, field_175828_a);
152
            }
153
154
            for (int i = 1; i <= 7; ++i)
155
            {
156
                IBlockState iblockstate = field_175826_b;
157
158
                if (i == 2 || i == 6)
159
                {
160
                    iblockstate = field_175828_a;
161
                }
162
163
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i, 0, 0, i, 7, iblockstate, iblockstate, false);
164
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, i, 0, 15, i, 7, iblockstate, iblockstate, false);
165
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 0, 15, i, 0, iblockstate, iblockstate, false);
166
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 7, 14, i, 7, iblockstate, iblockstate, false);
167
            }
168
169
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 3, 2, 7, 4, field_175826_b, field_175826_b, false);
170
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 2, 4, 7, 2, field_175826_b, field_175826_b, false);
171
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 5, 4, 7, 5, field_175826_b, field_175826_b, false);
172
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 1, 3, 13, 7, 4, field_175826_b, field_175826_b, false);
173
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 11, 1, 2, 12, 7, 2, field_175826_b, field_175826_b, false);
174
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 11, 1, 5, 12, 7, 5, field_175826_b, field_175826_b, false);
175
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 3, 5, 3, 4, field_175826_b, field_175826_b, false);
176
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 1, 3, 10, 3, 4, field_175826_b, field_175826_b, false);
177
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 7, 2, 10, 7, 5, field_175826_b, field_175826_b, false);
178
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 5, 2, 5, 7, 2, field_175826_b, field_175826_b, false);
179
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 5, 2, 10, 7, 2, field_175826_b, field_175826_b, false);
180
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 5, 5, 5, 7, 5, field_175826_b, field_175826_b, false);
181
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 5, 5, 10, 7, 5, field_175826_b, field_175826_b, false);
182
            this.setBlockState(worldIn, field_175826_b, 6, 6, 2, structureBoundingBoxIn);
183
            this.setBlockState(worldIn, field_175826_b, 9, 6, 2, structureBoundingBoxIn);
184
            this.setBlockState(worldIn, field_175826_b, 6, 6, 5, structureBoundingBoxIn);
185
            this.setBlockState(worldIn, field_175826_b, 9, 6, 5, structureBoundingBoxIn);
186
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 4, 3, 6, 4, 4, field_175826_b, field_175826_b, false);
187
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 4, 3, 10, 4, 4, field_175826_b, field_175826_b, false);
188
            this.setBlockState(worldIn, field_175825_e, 5, 4, 2, structureBoundingBoxIn);
189
            this.setBlockState(worldIn, field_175825_e, 5, 4, 5, structureBoundingBoxIn);
190
            this.setBlockState(worldIn, field_175825_e, 10, 4, 2, structureBoundingBoxIn);
191
            this.setBlockState(worldIn, field_175825_e, 10, 4, 5, structureBoundingBoxIn);
192
193
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.SOUTH.getIndex()])
194
            {
195
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, false);
196
            }
197
198
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.NORTH.getIndex()])
199
            {
200
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 7, 4, 2, 7, false);
201
            }
202
203
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.WEST.getIndex()])
204
            {
205
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, false);
206
            }
207
208
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.SOUTH.getIndex()])
209
            {
210
                this.func_181655_a(worldIn, structureBoundingBoxIn, 11, 1, 0, 12, 2, 0, false);
211
            }
212
213
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.NORTH.getIndex()])
214
            {
215
                this.func_181655_a(worldIn, structureBoundingBoxIn, 11, 1, 7, 12, 2, 7, false);
216
            }
217
218
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.EAST.getIndex()])
219
            {
220
                this.func_181655_a(worldIn, structureBoundingBoxIn, 15, 1, 3, 15, 2, 4, false);
221
            }
222
223
            if (structureoceanmonumentpieces$roomdefinition2.field_175966_c[EnumFacing.SOUTH.getIndex()])
224
            {
225
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 5, 0, 4, 6, 0, false);
226
            }
227
228
            if (structureoceanmonumentpieces$roomdefinition2.field_175966_c[EnumFacing.NORTH.getIndex()])
229
            {
230
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 5, 7, 4, 6, 7, false);
231
            }
232
233
            if (structureoceanmonumentpieces$roomdefinition2.field_175966_c[EnumFacing.WEST.getIndex()])
234
            {
235
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 5, 3, 0, 6, 4, false);
236
            }
237
238
            if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[EnumFacing.SOUTH.getIndex()])
239
            {
240
                this.func_181655_a(worldIn, structureBoundingBoxIn, 11, 5, 0, 12, 6, 0, false);
241
            }
242
243
            if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[EnumFacing.NORTH.getIndex()])
244
            {
245
                this.func_181655_a(worldIn, structureBoundingBoxIn, 11, 5, 7, 12, 6, 7, false);
246
            }
247
248
            if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[EnumFacing.EAST.getIndex()])
249
            {
250
                this.func_181655_a(worldIn, structureBoundingBoxIn, 15, 5, 3, 15, 6, 4, false);
251
            }
252
253
            return true;
254
        }
255
    }
256
257
    public static class DoubleYRoom extends StructureOceanMonumentPieces.Piece
258
    {
259
        public DoubleYRoom()
260
        {
261
        }
262
263
        public DoubleYRoom(EnumFacing p_i45595_1_, StructureOceanMonumentPieces.RoomDefinition p_i45595_2_, Random p_i45595_3_)
264
        {
265
            super(1, p_i45595_1_, p_i45595_2_, 1, 2, 1);
266
        }
267
268
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
269
        {
270
            if (this.field_175830_k.field_175967_a / 25 > 0)
271
            {
272
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, this.field_175830_k.field_175966_c[EnumFacing.DOWN.getIndex()]);
273
            }
274
275
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = this.field_175830_k.field_175965_b[EnumFacing.UP.getIndex()];
276
277
            if (structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()] == null)
278
            {
279
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 8, 1, 6, 8, 6, field_175828_a);
280
            }
281
282
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 4, 0, 0, 4, 7, field_175826_b, field_175826_b, false);
283
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 4, 0, 7, 4, 7, field_175826_b, field_175826_b, false);
284
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 0, 6, 4, 0, field_175826_b, field_175826_b, false);
285
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 7, 6, 4, 7, field_175826_b, field_175826_b, false);
286
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 4, 1, 2, 4, 2, field_175826_b, field_175826_b, false);
287
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 2, 1, 4, 2, field_175826_b, field_175826_b, false);
288
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 4, 1, 5, 4, 2, field_175826_b, field_175826_b, false);
289
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 4, 2, 6, 4, 2, field_175826_b, field_175826_b, false);
290
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 4, 5, 2, 4, 6, field_175826_b, field_175826_b, false);
291
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 5, 1, 4, 5, field_175826_b, field_175826_b, false);
292
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 4, 5, 5, 4, 6, field_175826_b, field_175826_b, false);
293
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 4, 5, 6, 4, 5, field_175826_b, field_175826_b, false);
294
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition1 = this.field_175830_k;
295
296
            for (int i = 1; i <= 5; i += 4)
297
            {
298
                int j = 0;
299
300
                if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.SOUTH.getIndex()])
301
                {
302
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, i, j, 2, i + 2, j, field_175826_b, field_175826_b, false);
303
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, i, j, 5, i + 2, j, field_175826_b, field_175826_b, false);
304
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, i + 2, j, 4, i + 2, j, field_175826_b, field_175826_b, false);
305
                }
306
                else
307
                {
308
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i, j, 7, i + 2, j, field_175826_b, field_175826_b, false);
309
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i + 1, j, 7, i + 1, j, field_175828_a, field_175828_a, false);
310
                }
311
312
                j = 7;
313
314
                if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.NORTH.getIndex()])
315
                {
316
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, i, j, 2, i + 2, j, field_175826_b, field_175826_b, false);
317
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, i, j, 5, i + 2, j, field_175826_b, field_175826_b, false);
318
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, i + 2, j, 4, i + 2, j, field_175826_b, field_175826_b, false);
319
                }
320
                else
321
                {
322
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i, j, 7, i + 2, j, field_175826_b, field_175826_b, false);
323
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i + 1, j, 7, i + 1, j, field_175828_a, field_175828_a, false);
324
                }
325
326
                int k = 0;
327
328
                if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.WEST.getIndex()])
329
                {
330
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i, 2, k, i + 2, 2, field_175826_b, field_175826_b, false);
331
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i, 5, k, i + 2, 5, field_175826_b, field_175826_b, false);
332
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i + 2, 3, k, i + 2, 4, field_175826_b, field_175826_b, false);
333
                }
334
                else
335
                {
336
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i, 0, k, i + 2, 7, field_175826_b, field_175826_b, false);
337
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i + 1, 0, k, i + 1, 7, field_175828_a, field_175828_a, false);
338
                }
339
340
                k = 7;
341
342
                if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.EAST.getIndex()])
343
                {
344
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i, 2, k, i + 2, 2, field_175826_b, field_175826_b, false);
345
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i, 5, k, i + 2, 5, field_175826_b, field_175826_b, false);
346
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i + 2, 3, k, i + 2, 4, field_175826_b, field_175826_b, false);
347
                }
348
                else
349
                {
350
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i, 0, k, i + 2, 7, field_175826_b, field_175826_b, false);
351
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, k, i + 1, 0, k, i + 1, 7, field_175828_a, field_175828_a, false);
352
                }
353
354
                structureoceanmonumentpieces$roomdefinition1 = structureoceanmonumentpieces$roomdefinition;
355
            }
356
357
            return true;
358
        }
359
    }
360
361
    public static class DoubleYZRoom extends StructureOceanMonumentPieces.Piece
362
    {
363
        public DoubleYZRoom()
364
        {
365
        }
366
367
        public DoubleYZRoom(EnumFacing p_i45594_1_, StructureOceanMonumentPieces.RoomDefinition p_i45594_2_, Random p_i45594_3_)
368
        {
369
            super(1, p_i45594_1_, p_i45594_2_, 1, 2, 2);
370
        }
371
372
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
373
        {
374
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = this.field_175830_k.field_175965_b[EnumFacing.NORTH.getIndex()];
375
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition1 = this.field_175830_k;
376
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition2 = structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()];
377
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition3 = structureoceanmonumentpieces$roomdefinition1.field_175965_b[EnumFacing.UP.getIndex()];
378
379
            if (this.field_175830_k.field_175967_a / 25 > 0)
380
            {
381
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 8, structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.DOWN.getIndex()]);
382
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.DOWN.getIndex()]);
383
            }
384
385
            if (structureoceanmonumentpieces$roomdefinition3.field_175965_b[EnumFacing.UP.getIndex()] == null)
386
            {
387
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 8, 1, 6, 8, 7, field_175828_a);
388
            }
389
390
            if (structureoceanmonumentpieces$roomdefinition2.field_175965_b[EnumFacing.UP.getIndex()] == null)
391
            {
392
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 8, 8, 6, 8, 14, field_175828_a);
393
            }
394
395
            for (int i = 1; i <= 7; ++i)
396
            {
397
                IBlockState iblockstate = field_175826_b;
398
399
                if (i == 2 || i == 6)
400
                {
401
                    iblockstate = field_175828_a;
402
                }
403
404
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i, 0, 0, i, 15, iblockstate, iblockstate, false);
405
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, i, 0, 7, i, 15, iblockstate, iblockstate, false);
406
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 0, 6, i, 0, iblockstate, iblockstate, false);
407
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 15, 6, i, 15, iblockstate, iblockstate, false);
408
            }
409
410
            for (int j = 1; j <= 7; ++j)
411
            {
412
                IBlockState iblockstate1 = field_175827_c;
413
414
                if (j == 2 || j == 6)
415
                {
416
                    iblockstate1 = field_175825_e;
417
                }
418
419
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, j, 7, 4, j, 8, iblockstate1, iblockstate1, false);
420
            }
421
422
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.SOUTH.getIndex()])
423
            {
424
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, false);
425
            }
426
427
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.EAST.getIndex()])
428
            {
429
                this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 1, 3, 7, 2, 4, false);
430
            }
431
432
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.WEST.getIndex()])
433
            {
434
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, false);
435
            }
436
437
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.NORTH.getIndex()])
438
            {
439
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 15, 4, 2, 15, false);
440
            }
441
442
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.WEST.getIndex()])
443
            {
444
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 11, 0, 2, 12, false);
445
            }
446
447
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.EAST.getIndex()])
448
            {
449
                this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 1, 11, 7, 2, 12, false);
450
            }
451
452
            if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[EnumFacing.SOUTH.getIndex()])
453
            {
454
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 5, 0, 4, 6, 0, false);
455
            }
456
457
            if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[EnumFacing.EAST.getIndex()])
458
            {
459
                this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 5, 3, 7, 6, 4, false);
460
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 4, 2, 6, 4, 5, field_175826_b, field_175826_b, false);
461
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 2, 6, 3, 2, field_175826_b, field_175826_b, false);
462
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 5, 6, 3, 5, field_175826_b, field_175826_b, false);
463
            }
464
465
            if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[EnumFacing.WEST.getIndex()])
466
            {
467
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 5, 3, 0, 6, 4, false);
468
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 2, 2, 4, 5, field_175826_b, field_175826_b, false);
469
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 2, 1, 3, 2, field_175826_b, field_175826_b, false);
470
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 5, 1, 3, 5, field_175826_b, field_175826_b, false);
471
            }
472
473
            if (structureoceanmonumentpieces$roomdefinition2.field_175966_c[EnumFacing.NORTH.getIndex()])
474
            {
475
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 5, 15, 4, 6, 15, false);
476
            }
477
478
            if (structureoceanmonumentpieces$roomdefinition2.field_175966_c[EnumFacing.WEST.getIndex()])
479
            {
480
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 5, 11, 0, 6, 12, false);
481
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 4, 10, 2, 4, 13, field_175826_b, field_175826_b, false);
482
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 10, 1, 3, 10, field_175826_b, field_175826_b, false);
483
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 13, 1, 3, 13, field_175826_b, field_175826_b, false);
484
            }
485
486
            if (structureoceanmonumentpieces$roomdefinition2.field_175966_c[EnumFacing.EAST.getIndex()])
487
            {
488
                this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 5, 11, 7, 6, 12, false);
489
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 4, 10, 6, 4, 13, field_175826_b, field_175826_b, false);
490
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 10, 6, 3, 10, field_175826_b, field_175826_b, false);
491
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 13, 6, 3, 13, field_175826_b, field_175826_b, false);
492
            }
493
494
            return true;
495
        }
496
    }
497
498
    public static class DoubleZRoom extends StructureOceanMonumentPieces.Piece
499
    {
500
        public DoubleZRoom()
501
        {
502
        }
503
504
        public DoubleZRoom(EnumFacing p_i45593_1_, StructureOceanMonumentPieces.RoomDefinition p_i45593_2_, Random p_i45593_3_)
505
        {
506
            super(1, p_i45593_1_, p_i45593_2_, 1, 1, 2);
507
        }
508
509
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
510
        {
511
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = this.field_175830_k.field_175965_b[EnumFacing.NORTH.getIndex()];
512
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition1 = this.field_175830_k;
513
514
            if (this.field_175830_k.field_175967_a / 25 > 0)
515
            {
516
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 8, structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.DOWN.getIndex()]);
517
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.DOWN.getIndex()]);
518
            }
519
520
            if (structureoceanmonumentpieces$roomdefinition1.field_175965_b[EnumFacing.UP.getIndex()] == null)
521
            {
522
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 4, 1, 6, 4, 7, field_175828_a);
523
            }
524
525
            if (structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()] == null)
526
            {
527
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 4, 8, 6, 4, 14, field_175828_a);
528
            }
529
530
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 0, 3, 15, field_175826_b, field_175826_b, false);
531
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 3, 0, 7, 3, 15, field_175826_b, field_175826_b, false);
532
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 0, 7, 3, 0, field_175826_b, field_175826_b, false);
533
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 15, 6, 3, 15, field_175826_b, field_175826_b, false);
534
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 2, 15, field_175828_a, field_175828_a, false);
535
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 0, 7, 2, 15, field_175828_a, field_175828_a, false);
536
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 0, 7, 2, 0, field_175828_a, field_175828_a, false);
537
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 15, 6, 2, 15, field_175828_a, field_175828_a, false);
538
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 0, 1, 15, field_175826_b, field_175826_b, false);
539
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 0, 7, 1, 15, field_175826_b, field_175826_b, false);
540
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 0, 7, 1, 0, field_175826_b, field_175826_b, false);
541
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 15, 6, 1, 15, field_175826_b, field_175826_b, false);
542
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 1, 1, 1, 2, field_175826_b, field_175826_b, false);
543
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 1, 6, 1, 2, field_175826_b, field_175826_b, false);
544
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 1, 1, 3, 2, field_175826_b, field_175826_b, false);
545
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 3, 1, 6, 3, 2, field_175826_b, field_175826_b, false);
546
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 13, 1, 1, 14, field_175826_b, field_175826_b, false);
547
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 13, 6, 1, 14, field_175826_b, field_175826_b, false);
548
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 13, 1, 3, 14, field_175826_b, field_175826_b, false);
549
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 3, 13, 6, 3, 14, field_175826_b, field_175826_b, false);
550
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 6, 2, 3, 6, field_175826_b, field_175826_b, false);
551
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 6, 5, 3, 6, field_175826_b, field_175826_b, false);
552
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 9, 2, 3, 9, field_175826_b, field_175826_b, false);
553
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 9, 5, 3, 9, field_175826_b, field_175826_b, false);
554
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 2, 6, 4, 2, 6, field_175826_b, field_175826_b, false);
555
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 2, 9, 4, 2, 9, field_175826_b, field_175826_b, false);
556
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 2, 7, 2, 2, 8, field_175826_b, field_175826_b, false);
557
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 2, 7, 5, 2, 8, field_175826_b, field_175826_b, false);
558
            this.setBlockState(worldIn, field_175825_e, 2, 2, 5, structureBoundingBoxIn);
559
            this.setBlockState(worldIn, field_175825_e, 5, 2, 5, structureBoundingBoxIn);
560
            this.setBlockState(worldIn, field_175825_e, 2, 2, 10, structureBoundingBoxIn);
561
            this.setBlockState(worldIn, field_175825_e, 5, 2, 10, structureBoundingBoxIn);
562
            this.setBlockState(worldIn, field_175826_b, 2, 3, 5, structureBoundingBoxIn);
563
            this.setBlockState(worldIn, field_175826_b, 5, 3, 5, structureBoundingBoxIn);
564
            this.setBlockState(worldIn, field_175826_b, 2, 3, 10, structureBoundingBoxIn);
565
            this.setBlockState(worldIn, field_175826_b, 5, 3, 10, structureBoundingBoxIn);
566
567
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.SOUTH.getIndex()])
568
            {
569
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, false);
570
            }
571
572
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.EAST.getIndex()])
573
            {
574
                this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 1, 3, 7, 2, 4, false);
575
            }
576
577
            if (structureoceanmonumentpieces$roomdefinition1.field_175966_c[EnumFacing.WEST.getIndex()])
578
            {
579
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, false);
580
            }
581
582
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.NORTH.getIndex()])
583
            {
584
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 15, 4, 2, 15, false);
585
            }
586
587
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.WEST.getIndex()])
588
            {
589
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 11, 0, 2, 12, false);
590
            }
591
592
            if (structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.EAST.getIndex()])
593
            {
594
                this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 1, 11, 7, 2, 12, false);
595
            }
596
597
            return true;
598
        }
599
    }
600
601
    public static class EntryRoom extends StructureOceanMonumentPieces.Piece
602
    {
603
        public EntryRoom()
604
        {
605
        }
606
607
        public EntryRoom(EnumFacing p_i45592_1_, StructureOceanMonumentPieces.RoomDefinition p_i45592_2_)
608
        {
609
            super(1, p_i45592_1_, p_i45592_2_, 1, 1, 1);
610
        }
611
612
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
613
        {
614
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 2, 3, 7, field_175826_b, field_175826_b, false);
615
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 3, 0, 7, 3, 7, field_175826_b, field_175826_b, false);
616
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 1, 2, 7, field_175826_b, field_175826_b, false);
617
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 2, 0, 7, 2, 7, field_175826_b, field_175826_b, false);
618
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 0, 1, 7, field_175826_b, field_175826_b, false);
619
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 0, 7, 1, 7, field_175826_b, field_175826_b, false);
620
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 7, 7, 3, 7, field_175826_b, field_175826_b, false);
621
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 0, 2, 3, 0, field_175826_b, field_175826_b, false);
622
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 0, 6, 3, 0, field_175826_b, field_175826_b, false);
623
624
            if (this.field_175830_k.field_175966_c[EnumFacing.NORTH.getIndex()])
625
            {
626
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 7, 4, 2, 7, false);
627
            }
628
629
            if (this.field_175830_k.field_175966_c[EnumFacing.WEST.getIndex()])
630
            {
631
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 3, 1, 2, 4, false);
632
            }
633
634
            if (this.field_175830_k.field_175966_c[EnumFacing.EAST.getIndex()])
635
            {
636
                this.func_181655_a(worldIn, structureBoundingBoxIn, 6, 1, 3, 7, 2, 4, false);
637
            }
638
639
            return true;
640
        }
641
    }
642
643
    static class FitSimpleRoomHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
644
    {
645
        private FitSimpleRoomHelper()
646
        {
647
        }
648
649
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
650
        {
651
            return true;
652
        }
653
654
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
655
        {
656
            p_175968_2_.field_175963_d = true;
657
            return new StructureOceanMonumentPieces.SimpleRoom(p_175968_1_, p_175968_2_, p_175968_3_);
658
        }
659
    }
660
661
    static class FitSimpleRoomTopHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
662
    {
663
        private FitSimpleRoomTopHelper()
664
        {
665
        }
666
667
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
668
        {
669
            return !p_175969_1_.field_175966_c[EnumFacing.WEST.getIndex()] && !p_175969_1_.field_175966_c[EnumFacing.EAST.getIndex()] && !p_175969_1_.field_175966_c[EnumFacing.NORTH.getIndex()] && !p_175969_1_.field_175966_c[EnumFacing.SOUTH.getIndex()] && !p_175969_1_.field_175966_c[EnumFacing.UP.getIndex()];
670
        }
671
672
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
673
        {
674
            p_175968_2_.field_175963_d = true;
675
            return new StructureOceanMonumentPieces.SimpleTopRoom(p_175968_1_, p_175968_2_, p_175968_3_);
676
        }
677
    }
678
679
    public static class MonumentBuilding extends StructureOceanMonumentPieces.Piece
680
    {
681
        private StructureOceanMonumentPieces.RoomDefinition field_175845_o;
682
        private StructureOceanMonumentPieces.RoomDefinition field_175844_p;
683
        private List<StructureOceanMonumentPieces.Piece> field_175843_q = Lists.<StructureOceanMonumentPieces.Piece>newArrayList();
684
685
        public MonumentBuilding()
686
        {
687
        }
688
689
        public MonumentBuilding(Random p_i45599_1_, int p_i45599_2_, int p_i45599_3_, EnumFacing p_i45599_4_)
690
        {
691
            super(0);
692
            this.coordBaseMode = p_i45599_4_;
693
694
            switch (this.coordBaseMode)
695
            {
696
                case NORTH:
697
                case SOUTH:
698
                    this.boundingBox = new StructureBoundingBox(p_i45599_2_, 39, p_i45599_3_, p_i45599_2_ + 58 - 1, 61, p_i45599_3_ + 58 - 1);
699
                    break;
700
701
                default:
702
                    this.boundingBox = new StructureBoundingBox(p_i45599_2_, 39, p_i45599_3_, p_i45599_2_ + 58 - 1, 61, p_i45599_3_ + 58 - 1);
703
            }
704
705
            List<StructureOceanMonumentPieces.RoomDefinition> list = this.func_175836_a(p_i45599_1_);
706
            this.field_175845_o.field_175963_d = true;
707
            this.field_175843_q.add(new StructureOceanMonumentPieces.EntryRoom(this.coordBaseMode, this.field_175845_o));
708
            this.field_175843_q.add(new StructureOceanMonumentPieces.MonumentCoreRoom(this.coordBaseMode, this.field_175844_p, p_i45599_1_));
709
            List<StructureOceanMonumentPieces.MonumentRoomFitHelper> list1 = Lists.<StructureOceanMonumentPieces.MonumentRoomFitHelper>newArrayList();
710
            list1.add(new StructureOceanMonumentPieces.XYDoubleRoomFitHelper());
711
            list1.add(new StructureOceanMonumentPieces.YZDoubleRoomFitHelper());
712
            list1.add(new StructureOceanMonumentPieces.ZDoubleRoomFitHelper());
713
            list1.add(new StructureOceanMonumentPieces.XDoubleRoomFitHelper());
714
            list1.add(new StructureOceanMonumentPieces.YDoubleRoomFitHelper());
715
            list1.add(new StructureOceanMonumentPieces.FitSimpleRoomTopHelper());
716
            list1.add(new StructureOceanMonumentPieces.FitSimpleRoomHelper());
717
            label319:
718
719
            for (StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition : list)
720
            {
721
                if (!structureoceanmonumentpieces$roomdefinition.field_175963_d && !structureoceanmonumentpieces$roomdefinition.func_175961_b())
722
                {
723
                    Iterator iterator = list1.iterator();
724
                    StructureOceanMonumentPieces.MonumentRoomFitHelper structureoceanmonumentpieces$monumentroomfithelper;
725
726
                    while (true)
727
                    {
728
                        if (!iterator.hasNext())
729
                        {
730
                            continue label319;
731
                        }
732
733
                        structureoceanmonumentpieces$monumentroomfithelper = (StructureOceanMonumentPieces.MonumentRoomFitHelper)iterator.next();
734
735
                        if (structureoceanmonumentpieces$monumentroomfithelper.func_175969_a(structureoceanmonumentpieces$roomdefinition))
736
                        {
737
                            break;
738
                        }
739
                    }
740
741
                    this.field_175843_q.add(structureoceanmonumentpieces$monumentroomfithelper.func_175968_a(this.coordBaseMode, structureoceanmonumentpieces$roomdefinition, p_i45599_1_));
742
                }
743
            }
744
745
            int j = this.boundingBox.minY;
746
            int k = this.getXWithOffset(9, 22);
747
            int l = this.getZWithOffset(9, 22);
748
749
            for (StructureOceanMonumentPieces.Piece structureoceanmonumentpieces$piece : this.field_175843_q)
750
            {
751
                structureoceanmonumentpieces$piece.getBoundingBox().offset(k, j, l);
752
            }
753
754
            StructureBoundingBox structureboundingbox1 = StructureBoundingBox.func_175899_a(this.getXWithOffset(1, 1), this.getYWithOffset(1), this.getZWithOffset(1, 1), this.getXWithOffset(23, 21), this.getYWithOffset(8), this.getZWithOffset(23, 21));
755
            StructureBoundingBox structureboundingbox2 = StructureBoundingBox.func_175899_a(this.getXWithOffset(34, 1), this.getYWithOffset(1), this.getZWithOffset(34, 1), this.getXWithOffset(56, 21), this.getYWithOffset(8), this.getZWithOffset(56, 21));
756
            StructureBoundingBox structureboundingbox = StructureBoundingBox.func_175899_a(this.getXWithOffset(22, 22), this.getYWithOffset(13), this.getZWithOffset(22, 22), this.getXWithOffset(35, 35), this.getYWithOffset(17), this.getZWithOffset(35, 35));
757
            int i = p_i45599_1_.nextInt();
758
            this.field_175843_q.add(new StructureOceanMonumentPieces.WingRoom(this.coordBaseMode, structureboundingbox1, i++));
759
            this.field_175843_q.add(new StructureOceanMonumentPieces.WingRoom(this.coordBaseMode, structureboundingbox2, i++));
760
            this.field_175843_q.add(new StructureOceanMonumentPieces.Penthouse(this.coordBaseMode, structureboundingbox));
761
        }
762
763
        private List<StructureOceanMonumentPieces.RoomDefinition> func_175836_a(Random p_175836_1_)
764
        {
765
            StructureOceanMonumentPieces.RoomDefinition[] astructureoceanmonumentpieces$roomdefinition = new StructureOceanMonumentPieces.RoomDefinition[75];
766
767
            for (int i = 0; i < 5; ++i)
768
            {
769
                for (int j = 0; j < 4; ++j)
770
                {
771
                    int k = 0;
772
                    int l = func_175820_a(i, k, j);
773
                    astructureoceanmonumentpieces$roomdefinition[l] = new StructureOceanMonumentPieces.RoomDefinition(l);
774
                }
775
            }
776
777
            for (int i2 = 0; i2 < 5; ++i2)
778
            {
779
                for (int l2 = 0; l2 < 4; ++l2)
780
                {
781
                    int k3 = 1;
782
                    int j4 = func_175820_a(i2, k3, l2);
783
                    astructureoceanmonumentpieces$roomdefinition[j4] = new StructureOceanMonumentPieces.RoomDefinition(j4);
784
                }
785
            }
786
787
            for (int j2 = 1; j2 < 4; ++j2)
788
            {
789
                for (int i3 = 0; i3 < 2; ++i3)
790
                {
791
                    int l3 = 2;
792
                    int k4 = func_175820_a(j2, l3, i3);
793
                    astructureoceanmonumentpieces$roomdefinition[k4] = new StructureOceanMonumentPieces.RoomDefinition(k4);
794
                }
795
            }
796
797
            this.field_175845_o = astructureoceanmonumentpieces$roomdefinition[field_175823_g];
798
799
            for (int k2 = 0; k2 < 5; ++k2)
800
            {
801
                for (int j3 = 0; j3 < 5; ++j3)
802
                {
803
                    for (int i4 = 0; i4 < 3; ++i4)
804
                    {
805
                        int l4 = func_175820_a(k2, i4, j3);
806
807
                        if (astructureoceanmonumentpieces$roomdefinition[l4] != null)
808
                        {
809
                            for (EnumFacing enumfacing : EnumFacing.values())
810
                            {
811
                                int i1 = k2 + enumfacing.getFrontOffsetX();
812
                                int j1 = i4 + enumfacing.getFrontOffsetY();
813
                                int k1 = j3 + enumfacing.getFrontOffsetZ();
814
815
                                if (i1 >= 0 && i1 < 5 && k1 >= 0 && k1 < 5 && j1 >= 0 && j1 < 3)
816
                                {
817
                                    int l1 = func_175820_a(i1, j1, k1);
818
819
                                    if (astructureoceanmonumentpieces$roomdefinition[l1] != null)
820
                                    {
821
                                        if (k1 != j3)
822
                                        {
823
                                            astructureoceanmonumentpieces$roomdefinition[l4].func_175957_a(enumfacing.getOpposite(), astructureoceanmonumentpieces$roomdefinition[l1]);
824
                                        }
825
                                        else
826
                                        {
827
                                            astructureoceanmonumentpieces$roomdefinition[l4].func_175957_a(enumfacing, astructureoceanmonumentpieces$roomdefinition[l1]);
828
                                        }
829
                                    }
830
                                }
831
                            }
832
                        }
833
                    }
834
                }
835
            }
836
837
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition;
838
            astructureoceanmonumentpieces$roomdefinition[field_175831_h].func_175957_a(EnumFacing.UP, structureoceanmonumentpieces$roomdefinition = new StructureOceanMonumentPieces.RoomDefinition(1003));
839
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition1;
840
            astructureoceanmonumentpieces$roomdefinition[field_175832_i].func_175957_a(EnumFacing.SOUTH, structureoceanmonumentpieces$roomdefinition1 = new StructureOceanMonumentPieces.RoomDefinition(1001));
841
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition2;
842
            astructureoceanmonumentpieces$roomdefinition[field_175829_j].func_175957_a(EnumFacing.SOUTH, structureoceanmonumentpieces$roomdefinition2 = new StructureOceanMonumentPieces.RoomDefinition(1002));
843
            structureoceanmonumentpieces$roomdefinition.field_175963_d = true;
844
            structureoceanmonumentpieces$roomdefinition1.field_175963_d = true;
845
            structureoceanmonumentpieces$roomdefinition2.field_175963_d = true;
846
            this.field_175845_o.field_175964_e = true;
847
            this.field_175844_p = astructureoceanmonumentpieces$roomdefinition[func_175820_a(p_175836_1_.nextInt(4), 0, 2)];
848
            this.field_175844_p.field_175963_d = true;
849
            this.field_175844_p.field_175965_b[EnumFacing.EAST.getIndex()].field_175963_d = true;
850
            this.field_175844_p.field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d = true;
851
            this.field_175844_p.field_175965_b[EnumFacing.EAST.getIndex()].field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d = true;
852
            this.field_175844_p.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
853
            this.field_175844_p.field_175965_b[EnumFacing.EAST.getIndex()].field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
854
            this.field_175844_p.field_175965_b[EnumFacing.NORTH.getIndex()].field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
855
            this.field_175844_p.field_175965_b[EnumFacing.EAST.getIndex()].field_175965_b[EnumFacing.NORTH.getIndex()].field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
856
            List<StructureOceanMonumentPieces.RoomDefinition> list = Lists.<StructureOceanMonumentPieces.RoomDefinition>newArrayList();
857
858
            for (StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition4 : astructureoceanmonumentpieces$roomdefinition)
859
            {
860
                if (structureoceanmonumentpieces$roomdefinition4 != null)
861
                {
862
                    structureoceanmonumentpieces$roomdefinition4.func_175958_a();
863
                    list.add(structureoceanmonumentpieces$roomdefinition4);
864
                }
865
            }
866
867
            structureoceanmonumentpieces$roomdefinition.func_175958_a();
868
            Collections.shuffle(list, p_175836_1_);
869
            int i5 = 1;
870
871
            for (StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition3 : list)
872
            {
873
                int j5 = 0;
874
                int k5 = 0;
875
876
                while (j5 < 2 && k5 < 5)
877
                {
878
                    ++k5;
879
                    int l5 = p_175836_1_.nextInt(6);
880
881
                    if (structureoceanmonumentpieces$roomdefinition3.field_175966_c[l5])
882
                    {
883
                        int i6 = EnumFacing.getFront(l5).getOpposite().getIndex();
884
                        structureoceanmonumentpieces$roomdefinition3.field_175966_c[l5] = false;
885
                        structureoceanmonumentpieces$roomdefinition3.field_175965_b[l5].field_175966_c[i6] = false;
886
887
                        if (structureoceanmonumentpieces$roomdefinition3.func_175959_a(i5++) && structureoceanmonumentpieces$roomdefinition3.field_175965_b[l5].func_175959_a(i5++))
888
                        {
889
                            ++j5;
890
                        }
891
                        else
892
                        {
893
                            structureoceanmonumentpieces$roomdefinition3.field_175966_c[l5] = true;
894
                            structureoceanmonumentpieces$roomdefinition3.field_175965_b[l5].field_175966_c[i6] = true;
895
                        }
896
                    }
897
                }
898
            }
899
900
            list.add(structureoceanmonumentpieces$roomdefinition);
901
            list.add(structureoceanmonumentpieces$roomdefinition1);
902
            list.add(structureoceanmonumentpieces$roomdefinition2);
903
            return list;
904
        }
905
906
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
907
        {
908
            int i = Math.max(worldIn.getSeaLevel(), 64) - this.boundingBox.minY;
909
            this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 0, 0, 58, i, 58, false);
910
            this.func_175840_a(false, 0, worldIn, randomIn, structureBoundingBoxIn);
911
            this.func_175840_a(true, 33, worldIn, randomIn, structureBoundingBoxIn);
912
            this.func_175839_b(worldIn, randomIn, structureBoundingBoxIn);
913
            this.func_175837_c(worldIn, randomIn, structureBoundingBoxIn);
914
            this.func_175841_d(worldIn, randomIn, structureBoundingBoxIn);
915
            this.func_175835_e(worldIn, randomIn, structureBoundingBoxIn);
916
            this.func_175842_f(worldIn, randomIn, structureBoundingBoxIn);
917
            this.func_175838_g(worldIn, randomIn, structureBoundingBoxIn);
918
919
            for (int j = 0; j < 7; ++j)
920
            {
921
                int k = 0;
922
923
                while (k < 7)
924
                {
925
                    if (k == 0 && j == 3)
926
                    {
927
                        k = 6;
928
                    }
929
930
                    int l = j * 9;
931
                    int i1 = k * 9;
932
933
                    for (int j1 = 0; j1 < 4; ++j1)
934
                    {
935
                        for (int k1 = 0; k1 < 4; ++k1)
936
                        {
937
                            this.setBlockState(worldIn, field_175826_b, l + j1, 0, i1 + k1, structureBoundingBoxIn);
938
                            this.replaceAirAndLiquidDownwards(worldIn, field_175826_b, l + j1, -1, i1 + k1, structureBoundingBoxIn);
939
                        }
940
                    }
941
942
                    if (j != 0 && j != 6)
943
                    {
944
                        k += 6;
945
                    }
946
                    else
947
                    {
948
                        ++k;
949
                    }
950
                }
951
            }
952
953
            for (int l1 = 0; l1 < 5; ++l1)
954
            {
955
                this.func_181655_a(worldIn, structureBoundingBoxIn, -1 - l1, 0 + l1 * 2, -1 - l1, -1 - l1, 23, 58 + l1, false);
956
                this.func_181655_a(worldIn, structureBoundingBoxIn, 58 + l1, 0 + l1 * 2, -1 - l1, 58 + l1, 23, 58 + l1, false);
957
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0 - l1, 0 + l1 * 2, -1 - l1, 57 + l1, 23, -1 - l1, false);
958
                this.func_181655_a(worldIn, structureBoundingBoxIn, 0 - l1, 0 + l1 * 2, 58 + l1, 57 + l1, 23, 58 + l1, false);
959
            }
960
961
            for (StructureOceanMonumentPieces.Piece structureoceanmonumentpieces$piece : this.field_175843_q)
962
            {
963
                if (structureoceanmonumentpieces$piece.getBoundingBox().intersectsWith(structureBoundingBoxIn))
964
                {
965
                    structureoceanmonumentpieces$piece.addComponentParts(worldIn, randomIn, structureBoundingBoxIn);
966
                }
967
            }
968
969
            return true;
970
        }
971
972
        private void func_175840_a(boolean p_175840_1_, int p_175840_2_, World worldIn, Random p_175840_4_, StructureBoundingBox p_175840_5_)
973
        {
974
            int i = 24;
975
976
            if (this.func_175818_a(p_175840_5_, p_175840_2_, 0, p_175840_2_ + 23, 20))
977
            {
978
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 0, 0, 0, p_175840_2_ + 24, 0, 20, field_175828_a, field_175828_a, false);
979
                this.func_181655_a(worldIn, p_175840_5_, p_175840_2_ + 0, 1, 0, p_175840_2_ + 24, 10, 20, false);
980
981
                for (int j = 0; j < 4; ++j)
982
                {
983
                    this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + j, j + 1, j, p_175840_2_ + j, j + 1, 20, field_175826_b, field_175826_b, false);
984
                    this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + j + 7, j + 5, j + 7, p_175840_2_ + j + 7, j + 5, 20, field_175826_b, field_175826_b, false);
985
                    this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 17 - j, j + 5, j + 7, p_175840_2_ + 17 - j, j + 5, 20, field_175826_b, field_175826_b, false);
986
                    this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 24 - j, j + 1, j, p_175840_2_ + 24 - j, j + 1, 20, field_175826_b, field_175826_b, false);
987
                    this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + j + 1, j + 1, j, p_175840_2_ + 23 - j, j + 1, j, field_175826_b, field_175826_b, false);
988
                    this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + j + 8, j + 5, j + 7, p_175840_2_ + 16 - j, j + 5, j + 7, field_175826_b, field_175826_b, false);
989
                }
990
991
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 4, 4, 4, p_175840_2_ + 6, 4, 20, field_175828_a, field_175828_a, false);
992
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 7, 4, 4, p_175840_2_ + 17, 4, 6, field_175828_a, field_175828_a, false);
993
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 18, 4, 4, p_175840_2_ + 20, 4, 20, field_175828_a, field_175828_a, false);
994
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 11, 8, 11, p_175840_2_ + 13, 8, 20, field_175828_a, field_175828_a, false);
995
                this.setBlockState(worldIn, field_175824_d, p_175840_2_ + 12, 9, 12, p_175840_5_);
996
                this.setBlockState(worldIn, field_175824_d, p_175840_2_ + 12, 9, 15, p_175840_5_);
997
                this.setBlockState(worldIn, field_175824_d, p_175840_2_ + 12, 9, 18, p_175840_5_);
998
                int j1 = p_175840_1_ ? p_175840_2_ + 19 : p_175840_2_ + 5;
999
                int k = p_175840_1_ ? p_175840_2_ + 5 : p_175840_2_ + 19;
1000
1001
                for (int l = 20; l >= 5; l -= 3)
1002
                {
1003
                    this.setBlockState(worldIn, field_175824_d, j1, 5, l, p_175840_5_);
1004
                }
1005
1006
                for (int k1 = 19; k1 >= 7; k1 -= 3)
1007
                {
1008
                    this.setBlockState(worldIn, field_175824_d, k, 5, k1, p_175840_5_);
1009
                }
1010
1011
                for (int l1 = 0; l1 < 4; ++l1)
1012
                {
1013
                    int i1 = p_175840_1_ ? p_175840_2_ + (24 - (17 - l1 * 3)) : p_175840_2_ + 17 - l1 * 3;
1014
                    this.setBlockState(worldIn, field_175824_d, i1, 5, 5, p_175840_5_);
1015
                }
1016
1017
                this.setBlockState(worldIn, field_175824_d, k, 5, 5, p_175840_5_);
1018
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 11, 1, 12, p_175840_2_ + 13, 7, 12, field_175828_a, field_175828_a, false);
1019
                this.fillWithBlocks(worldIn, p_175840_5_, p_175840_2_ + 12, 1, 11, p_175840_2_ + 12, 7, 13, field_175828_a, field_175828_a, false);
1020
            }
1021
        }
1022
1023
        private void func_175839_b(World worldIn, Random p_175839_2_, StructureBoundingBox p_175839_3_)
1024
        {
1025
            if (this.func_175818_a(p_175839_3_, 22, 5, 35, 17))
1026
            {
1027
                this.func_181655_a(worldIn, p_175839_3_, 25, 0, 0, 32, 8, 20, false);
1028
1029
                for (int i = 0; i < 4; ++i)
1030
                {
1031
                    this.fillWithBlocks(worldIn, p_175839_3_, 24, 2, 5 + i * 4, 24, 4, 5 + i * 4, field_175826_b, field_175826_b, false);
1032
                    this.fillWithBlocks(worldIn, p_175839_3_, 22, 4, 5 + i * 4, 23, 4, 5 + i * 4, field_175826_b, field_175826_b, false);
1033
                    this.setBlockState(worldIn, field_175826_b, 25, 5, 5 + i * 4, p_175839_3_);
1034
                    this.setBlockState(worldIn, field_175826_b, 26, 6, 5 + i * 4, p_175839_3_);
1035
                    this.setBlockState(worldIn, field_175825_e, 26, 5, 5 + i * 4, p_175839_3_);
1036
                    this.fillWithBlocks(worldIn, p_175839_3_, 33, 2, 5 + i * 4, 33, 4, 5 + i * 4, field_175826_b, field_175826_b, false);
1037
                    this.fillWithBlocks(worldIn, p_175839_3_, 34, 4, 5 + i * 4, 35, 4, 5 + i * 4, field_175826_b, field_175826_b, false);
1038
                    this.setBlockState(worldIn, field_175826_b, 32, 5, 5 + i * 4, p_175839_3_);
1039
                    this.setBlockState(worldIn, field_175826_b, 31, 6, 5 + i * 4, p_175839_3_);
1040
                    this.setBlockState(worldIn, field_175825_e, 31, 5, 5 + i * 4, p_175839_3_);
1041
                    this.fillWithBlocks(worldIn, p_175839_3_, 27, 6, 5 + i * 4, 30, 6, 5 + i * 4, field_175828_a, field_175828_a, false);
1042
                }
1043
            }
1044
        }
1045
1046
        private void func_175837_c(World worldIn, Random p_175837_2_, StructureBoundingBox p_175837_3_)
1047
        {
1048
            if (this.func_175818_a(p_175837_3_, 15, 20, 42, 21))
1049
            {
1050
                this.fillWithBlocks(worldIn, p_175837_3_, 15, 0, 21, 42, 0, 21, field_175828_a, field_175828_a, false);
1051
                this.func_181655_a(worldIn, p_175837_3_, 26, 1, 21, 31, 3, 21, false);
1052
                this.fillWithBlocks(worldIn, p_175837_3_, 21, 12, 21, 36, 12, 21, field_175828_a, field_175828_a, false);
1053
                this.fillWithBlocks(worldIn, p_175837_3_, 17, 11, 21, 40, 11, 21, field_175828_a, field_175828_a, false);
1054
                this.fillWithBlocks(worldIn, p_175837_3_, 16, 10, 21, 41, 10, 21, field_175828_a, field_175828_a, false);
1055
                this.fillWithBlocks(worldIn, p_175837_3_, 15, 7, 21, 42, 9, 21, field_175828_a, field_175828_a, false);
1056
                this.fillWithBlocks(worldIn, p_175837_3_, 16, 6, 21, 41, 6, 21, field_175828_a, field_175828_a, false);
1057
                this.fillWithBlocks(worldIn, p_175837_3_, 17, 5, 21, 40, 5, 21, field_175828_a, field_175828_a, false);
1058
                this.fillWithBlocks(worldIn, p_175837_3_, 21, 4, 21, 36, 4, 21, field_175828_a, field_175828_a, false);
1059
                this.fillWithBlocks(worldIn, p_175837_3_, 22, 3, 21, 26, 3, 21, field_175828_a, field_175828_a, false);
1060
                this.fillWithBlocks(worldIn, p_175837_3_, 31, 3, 21, 35, 3, 21, field_175828_a, field_175828_a, false);
1061
                this.fillWithBlocks(worldIn, p_175837_3_, 23, 2, 21, 25, 2, 21, field_175828_a, field_175828_a, false);
1062
                this.fillWithBlocks(worldIn, p_175837_3_, 32, 2, 21, 34, 2, 21, field_175828_a, field_175828_a, false);
1063
                this.fillWithBlocks(worldIn, p_175837_3_, 28, 4, 20, 29, 4, 21, field_175826_b, field_175826_b, false);
1064
                this.setBlockState(worldIn, field_175826_b, 27, 3, 21, p_175837_3_);
1065
                this.setBlockState(worldIn, field_175826_b, 30, 3, 21, p_175837_3_);
1066
                this.setBlockState(worldIn, field_175826_b, 26, 2, 21, p_175837_3_);
1067
                this.setBlockState(worldIn, field_175826_b, 31, 2, 21, p_175837_3_);
1068
                this.setBlockState(worldIn, field_175826_b, 25, 1, 21, p_175837_3_);
1069
                this.setBlockState(worldIn, field_175826_b, 32, 1, 21, p_175837_3_);
1070
1071
                for (int i = 0; i < 7; ++i)
1072
                {
1073
                    this.setBlockState(worldIn, field_175827_c, 28 - i, 6 + i, 21, p_175837_3_);
1074
                    this.setBlockState(worldIn, field_175827_c, 29 + i, 6 + i, 21, p_175837_3_);
1075
                }
1076
1077
                for (int j = 0; j < 4; ++j)
1078
                {
1079
                    this.setBlockState(worldIn, field_175827_c, 28 - j, 9 + j, 21, p_175837_3_);
1080
                    this.setBlockState(worldIn, field_175827_c, 29 + j, 9 + j, 21, p_175837_3_);
1081
                }
1082
1083
                this.setBlockState(worldIn, field_175827_c, 28, 12, 21, p_175837_3_);
1084
                this.setBlockState(worldIn, field_175827_c, 29, 12, 21, p_175837_3_);
1085
1086
                for (int k = 0; k < 3; ++k)
1087
                {
1088
                    this.setBlockState(worldIn, field_175827_c, 22 - k * 2, 8, 21, p_175837_3_);
1089
                    this.setBlockState(worldIn, field_175827_c, 22 - k * 2, 9, 21, p_175837_3_);
1090
                    this.setBlockState(worldIn, field_175827_c, 35 + k * 2, 8, 21, p_175837_3_);
1091
                    this.setBlockState(worldIn, field_175827_c, 35 + k * 2, 9, 21, p_175837_3_);
1092
                }
1093
1094
                this.func_181655_a(worldIn, p_175837_3_, 15, 13, 21, 42, 15, 21, false);
1095
                this.func_181655_a(worldIn, p_175837_3_, 15, 1, 21, 15, 6, 21, false);
1096
                this.func_181655_a(worldIn, p_175837_3_, 16, 1, 21, 16, 5, 21, false);
1097
                this.func_181655_a(worldIn, p_175837_3_, 17, 1, 21, 20, 4, 21, false);
1098
                this.func_181655_a(worldIn, p_175837_3_, 21, 1, 21, 21, 3, 21, false);
1099
                this.func_181655_a(worldIn, p_175837_3_, 22, 1, 21, 22, 2, 21, false);
1100
                this.func_181655_a(worldIn, p_175837_3_, 23, 1, 21, 24, 1, 21, false);
1101
                this.func_181655_a(worldIn, p_175837_3_, 42, 1, 21, 42, 6, 21, false);
1102
                this.func_181655_a(worldIn, p_175837_3_, 41, 1, 21, 41, 5, 21, false);
1103
                this.func_181655_a(worldIn, p_175837_3_, 37, 1, 21, 40, 4, 21, false);
1104
                this.func_181655_a(worldIn, p_175837_3_, 36, 1, 21, 36, 3, 21, false);
1105
                this.func_181655_a(worldIn, p_175837_3_, 33, 1, 21, 34, 1, 21, false);
1106
                this.func_181655_a(worldIn, p_175837_3_, 35, 1, 21, 35, 2, 21, false);
1107
            }
1108
        }
1109
1110
        private void func_175841_d(World worldIn, Random p_175841_2_, StructureBoundingBox p_175841_3_)
1111
        {
1112
            if (this.func_175818_a(p_175841_3_, 21, 21, 36, 36))
1113
            {
1114
                this.fillWithBlocks(worldIn, p_175841_3_, 21, 0, 22, 36, 0, 36, field_175828_a, field_175828_a, false);
1115
                this.func_181655_a(worldIn, p_175841_3_, 21, 1, 22, 36, 23, 36, false);
1116
1117
                for (int i = 0; i < 4; ++i)
1118
                {
1119
                    this.fillWithBlocks(worldIn, p_175841_3_, 21 + i, 13 + i, 21 + i, 36 - i, 13 + i, 21 + i, field_175826_b, field_175826_b, false);
1120
                    this.fillWithBlocks(worldIn, p_175841_3_, 21 + i, 13 + i, 36 - i, 36 - i, 13 + i, 36 - i, field_175826_b, field_175826_b, false);
1121
                    this.fillWithBlocks(worldIn, p_175841_3_, 21 + i, 13 + i, 22 + i, 21 + i, 13 + i, 35 - i, field_175826_b, field_175826_b, false);
1122
                    this.fillWithBlocks(worldIn, p_175841_3_, 36 - i, 13 + i, 22 + i, 36 - i, 13 + i, 35 - i, field_175826_b, field_175826_b, false);
1123
                }
1124
1125
                this.fillWithBlocks(worldIn, p_175841_3_, 25, 16, 25, 32, 16, 32, field_175828_a, field_175828_a, false);
1126
                this.fillWithBlocks(worldIn, p_175841_3_, 25, 17, 25, 25, 19, 25, field_175826_b, field_175826_b, false);
1127
                this.fillWithBlocks(worldIn, p_175841_3_, 32, 17, 25, 32, 19, 25, field_175826_b, field_175826_b, false);
1128
                this.fillWithBlocks(worldIn, p_175841_3_, 25, 17, 32, 25, 19, 32, field_175826_b, field_175826_b, false);
1129
                this.fillWithBlocks(worldIn, p_175841_3_, 32, 17, 32, 32, 19, 32, field_175826_b, field_175826_b, false);
1130
                this.setBlockState(worldIn, field_175826_b, 26, 20, 26, p_175841_3_);
1131
                this.setBlockState(worldIn, field_175826_b, 27, 21, 27, p_175841_3_);
1132
                this.setBlockState(worldIn, field_175825_e, 27, 20, 27, p_175841_3_);
1133
                this.setBlockState(worldIn, field_175826_b, 26, 20, 31, p_175841_3_);
1134
                this.setBlockState(worldIn, field_175826_b, 27, 21, 30, p_175841_3_);
1135
                this.setBlockState(worldIn, field_175825_e, 27, 20, 30, p_175841_3_);
1136
                this.setBlockState(worldIn, field_175826_b, 31, 20, 31, p_175841_3_);
1137
                this.setBlockState(worldIn, field_175826_b, 30, 21, 30, p_175841_3_);
1138
                this.setBlockState(worldIn, field_175825_e, 30, 20, 30, p_175841_3_);
1139
                this.setBlockState(worldIn, field_175826_b, 31, 20, 26, p_175841_3_);
1140
                this.setBlockState(worldIn, field_175826_b, 30, 21, 27, p_175841_3_);
1141
                this.setBlockState(worldIn, field_175825_e, 30, 20, 27, p_175841_3_);
1142
                this.fillWithBlocks(worldIn, p_175841_3_, 28, 21, 27, 29, 21, 27, field_175828_a, field_175828_a, false);
1143
                this.fillWithBlocks(worldIn, p_175841_3_, 27, 21, 28, 27, 21, 29, field_175828_a, field_175828_a, false);
1144
                this.fillWithBlocks(worldIn, p_175841_3_, 28, 21, 30, 29, 21, 30, field_175828_a, field_175828_a, false);
1145
                this.fillWithBlocks(worldIn, p_175841_3_, 30, 21, 28, 30, 21, 29, field_175828_a, field_175828_a, false);
1146
            }
1147
        }
1148
1149
        private void func_175835_e(World worldIn, Random p_175835_2_, StructureBoundingBox p_175835_3_)
1150
        {
1151
            if (this.func_175818_a(p_175835_3_, 0, 21, 6, 58))
1152
            {
1153
                this.fillWithBlocks(worldIn, p_175835_3_, 0, 0, 21, 6, 0, 57, field_175828_a, field_175828_a, false);
1154
                this.func_181655_a(worldIn, p_175835_3_, 0, 1, 21, 6, 7, 57, false);
1155
                this.fillWithBlocks(worldIn, p_175835_3_, 4, 4, 21, 6, 4, 53, field_175828_a, field_175828_a, false);
1156
1157
                for (int i = 0; i < 4; ++i)
1158
                {
1159
                    this.fillWithBlocks(worldIn, p_175835_3_, i, i + 1, 21, i, i + 1, 57 - i, field_175826_b, field_175826_b, false);
1160
                }
1161
1162
                for (int j = 23; j < 53; j += 3)
1163
                {
1164
                    this.setBlockState(worldIn, field_175824_d, 5, 5, j, p_175835_3_);
1165
                }
1166
1167
                this.setBlockState(worldIn, field_175824_d, 5, 5, 52, p_175835_3_);
1168
1169
                for (int k = 0; k < 4; ++k)
1170
                {
1171
                    this.fillWithBlocks(worldIn, p_175835_3_, k, k + 1, 21, k, k + 1, 57 - k, field_175826_b, field_175826_b, false);
1172
                }
1173
1174
                this.fillWithBlocks(worldIn, p_175835_3_, 4, 1, 52, 6, 3, 52, field_175828_a, field_175828_a, false);
1175
                this.fillWithBlocks(worldIn, p_175835_3_, 5, 1, 51, 5, 3, 53, field_175828_a, field_175828_a, false);
1176
            }
1177
1178
            if (this.func_175818_a(p_175835_3_, 51, 21, 58, 58))
1179
            {
1180
                this.fillWithBlocks(worldIn, p_175835_3_, 51, 0, 21, 57, 0, 57, field_175828_a, field_175828_a, false);
1181
                this.func_181655_a(worldIn, p_175835_3_, 51, 1, 21, 57, 7, 57, false);
1182
                this.fillWithBlocks(worldIn, p_175835_3_, 51, 4, 21, 53, 4, 53, field_175828_a, field_175828_a, false);
1183
1184
                for (int l = 0; l < 4; ++l)
1185
                {
1186
                    this.fillWithBlocks(worldIn, p_175835_3_, 57 - l, l + 1, 21, 57 - l, l + 1, 57 - l, field_175826_b, field_175826_b, false);
1187
                }
1188
1189
                for (int i1 = 23; i1 < 53; i1 += 3)
1190
                {
1191
                    this.setBlockState(worldIn, field_175824_d, 52, 5, i1, p_175835_3_);
1192
                }
1193
1194
                this.setBlockState(worldIn, field_175824_d, 52, 5, 52, p_175835_3_);
1195
                this.fillWithBlocks(worldIn, p_175835_3_, 51, 1, 52, 53, 3, 52, field_175828_a, field_175828_a, false);
1196
                this.fillWithBlocks(worldIn, p_175835_3_, 52, 1, 51, 52, 3, 53, field_175828_a, field_175828_a, false);
1197
            }
1198
1199
            if (this.func_175818_a(p_175835_3_, 0, 51, 57, 57))
1200
            {
1201
                this.fillWithBlocks(worldIn, p_175835_3_, 7, 0, 51, 50, 0, 57, field_175828_a, field_175828_a, false);
1202
                this.func_181655_a(worldIn, p_175835_3_, 7, 1, 51, 50, 10, 57, false);
1203
1204
                for (int j1 = 0; j1 < 4; ++j1)
1205
                {
1206
                    this.fillWithBlocks(worldIn, p_175835_3_, j1 + 1, j1 + 1, 57 - j1, 56 - j1, j1 + 1, 57 - j1, field_175826_b, field_175826_b, false);
1207
                }
1208
            }
1209
        }
1210
1211
        private void func_175842_f(World worldIn, Random p_175842_2_, StructureBoundingBox p_175842_3_)
1212
        {
1213
            if (this.func_175818_a(p_175842_3_, 7, 21, 13, 50))
1214
            {
1215
                this.fillWithBlocks(worldIn, p_175842_3_, 7, 0, 21, 13, 0, 50, field_175828_a, field_175828_a, false);
1216
                this.func_181655_a(worldIn, p_175842_3_, 7, 1, 21, 13, 10, 50, false);
1217
                this.fillWithBlocks(worldIn, p_175842_3_, 11, 8, 21, 13, 8, 53, field_175828_a, field_175828_a, false);
1218
1219
                for (int i = 0; i < 4; ++i)
1220
                {
1221
                    this.fillWithBlocks(worldIn, p_175842_3_, i + 7, i + 5, 21, i + 7, i + 5, 54, field_175826_b, field_175826_b, false);
1222
                }
1223
1224
                for (int j = 21; j <= 45; j += 3)
1225
                {
1226
                    this.setBlockState(worldIn, field_175824_d, 12, 9, j, p_175842_3_);
1227
                }
1228
            }
1229
1230
            if (this.func_175818_a(p_175842_3_, 44, 21, 50, 54))
1231
            {
1232
                this.fillWithBlocks(worldIn, p_175842_3_, 44, 0, 21, 50, 0, 50, field_175828_a, field_175828_a, false);
1233
                this.func_181655_a(worldIn, p_175842_3_, 44, 1, 21, 50, 10, 50, false);
1234
                this.fillWithBlocks(worldIn, p_175842_3_, 44, 8, 21, 46, 8, 53, field_175828_a, field_175828_a, false);
1235
1236
                for (int k = 0; k < 4; ++k)
1237
                {
1238
                    this.fillWithBlocks(worldIn, p_175842_3_, 50 - k, k + 5, 21, 50 - k, k + 5, 54, field_175826_b, field_175826_b, false);
1239
                }
1240
1241
                for (int l = 21; l <= 45; l += 3)
1242
                {
1243
                    this.setBlockState(worldIn, field_175824_d, 45, 9, l, p_175842_3_);
1244
                }
1245
            }
1246
1247
            if (this.func_175818_a(p_175842_3_, 8, 44, 49, 54))
1248
            {
1249
                this.fillWithBlocks(worldIn, p_175842_3_, 14, 0, 44, 43, 0, 50, field_175828_a, field_175828_a, false);
1250
                this.func_181655_a(worldIn, p_175842_3_, 14, 1, 44, 43, 10, 50, false);
1251
1252
                for (int i1 = 12; i1 <= 45; i1 += 3)
1253
                {
1254
                    this.setBlockState(worldIn, field_175824_d, i1, 9, 45, p_175842_3_);
1255
                    this.setBlockState(worldIn, field_175824_d, i1, 9, 52, p_175842_3_);
1256
1257
                    if (i1 == 12 || i1 == 18 || i1 == 24 || i1 == 33 || i1 == 39 || i1 == 45)
1258
                    {
1259
                        this.setBlockState(worldIn, field_175824_d, i1, 9, 47, p_175842_3_);
1260
                        this.setBlockState(worldIn, field_175824_d, i1, 9, 50, p_175842_3_);
1261
                        this.setBlockState(worldIn, field_175824_d, i1, 10, 45, p_175842_3_);
1262
                        this.setBlockState(worldIn, field_175824_d, i1, 10, 46, p_175842_3_);
1263
                        this.setBlockState(worldIn, field_175824_d, i1, 10, 51, p_175842_3_);
1264
                        this.setBlockState(worldIn, field_175824_d, i1, 10, 52, p_175842_3_);
1265
                        this.setBlockState(worldIn, field_175824_d, i1, 11, 47, p_175842_3_);
1266
                        this.setBlockState(worldIn, field_175824_d, i1, 11, 50, p_175842_3_);
1267
                        this.setBlockState(worldIn, field_175824_d, i1, 12, 48, p_175842_3_);
1268
                        this.setBlockState(worldIn, field_175824_d, i1, 12, 49, p_175842_3_);
1269
                    }
1270
                }
1271
1272
                for (int j1 = 0; j1 < 3; ++j1)
1273
                {
1274
                    this.fillWithBlocks(worldIn, p_175842_3_, 8 + j1, 5 + j1, 54, 49 - j1, 5 + j1, 54, field_175828_a, field_175828_a, false);
1275
                }
1276
1277
                this.fillWithBlocks(worldIn, p_175842_3_, 11, 8, 54, 46, 8, 54, field_175826_b, field_175826_b, false);
1278
                this.fillWithBlocks(worldIn, p_175842_3_, 14, 8, 44, 43, 8, 53, field_175828_a, field_175828_a, false);
1279
            }
1280
        }
1281
1282
        private void func_175838_g(World worldIn, Random p_175838_2_, StructureBoundingBox p_175838_3_)
1283
        {
1284
            if (this.func_175818_a(p_175838_3_, 14, 21, 20, 43))
1285
            {
1286
                this.fillWithBlocks(worldIn, p_175838_3_, 14, 0, 21, 20, 0, 43, field_175828_a, field_175828_a, false);
1287
                this.func_181655_a(worldIn, p_175838_3_, 14, 1, 22, 20, 14, 43, false);
1288
                this.fillWithBlocks(worldIn, p_175838_3_, 18, 12, 22, 20, 12, 39, field_175828_a, field_175828_a, false);
1289
                this.fillWithBlocks(worldIn, p_175838_3_, 18, 12, 21, 20, 12, 21, field_175826_b, field_175826_b, false);
1290
1291
                for (int i = 0; i < 4; ++i)
1292
                {
1293
                    this.fillWithBlocks(worldIn, p_175838_3_, i + 14, i + 9, 21, i + 14, i + 9, 43 - i, field_175826_b, field_175826_b, false);
1294
                }
1295
1296
                for (int j = 23; j <= 39; j += 3)
1297
                {
1298
                    this.setBlockState(worldIn, field_175824_d, 19, 13, j, p_175838_3_);
1299
                }
1300
            }
1301
1302
            if (this.func_175818_a(p_175838_3_, 37, 21, 43, 43))
1303
            {
1304
                this.fillWithBlocks(worldIn, p_175838_3_, 37, 0, 21, 43, 0, 43, field_175828_a, field_175828_a, false);
1305
                this.func_181655_a(worldIn, p_175838_3_, 37, 1, 22, 43, 14, 43, false);
1306
                this.fillWithBlocks(worldIn, p_175838_3_, 37, 12, 22, 39, 12, 39, field_175828_a, field_175828_a, false);
1307
                this.fillWithBlocks(worldIn, p_175838_3_, 37, 12, 21, 39, 12, 21, field_175826_b, field_175826_b, false);
1308
1309
                for (int k = 0; k < 4; ++k)
1310
                {
1311
                    this.fillWithBlocks(worldIn, p_175838_3_, 43 - k, k + 9, 21, 43 - k, k + 9, 43 - k, field_175826_b, field_175826_b, false);
1312
                }
1313
1314
                for (int l = 23; l <= 39; l += 3)
1315
                {
1316
                    this.setBlockState(worldIn, field_175824_d, 38, 13, l, p_175838_3_);
1317
                }
1318
            }
1319
1320
            if (this.func_175818_a(p_175838_3_, 15, 37, 42, 43))
1321
            {
1322
                this.fillWithBlocks(worldIn, p_175838_3_, 21, 0, 37, 36, 0, 43, field_175828_a, field_175828_a, false);
1323
                this.func_181655_a(worldIn, p_175838_3_, 21, 1, 37, 36, 14, 43, false);
1324
                this.fillWithBlocks(worldIn, p_175838_3_, 21, 12, 37, 36, 12, 39, field_175828_a, field_175828_a, false);
1325
1326
                for (int i1 = 0; i1 < 4; ++i1)
1327
                {
1328
                    this.fillWithBlocks(worldIn, p_175838_3_, 15 + i1, i1 + 9, 43 - i1, 42 - i1, i1 + 9, 43 - i1, field_175826_b, field_175826_b, false);
1329
                }
1330
1331
                for (int j1 = 21; j1 <= 36; j1 += 3)
1332
                {
1333
                    this.setBlockState(worldIn, field_175824_d, j1, 13, 38, p_175838_3_);
1334
                }
1335
            }
1336
        }
1337
    }
1338
1339
    public static class MonumentCoreRoom extends StructureOceanMonumentPieces.Piece
1340
    {
1341
        public MonumentCoreRoom()
1342
        {
1343
        }
1344
1345
        public MonumentCoreRoom(EnumFacing p_i45598_1_, StructureOceanMonumentPieces.RoomDefinition p_i45598_2_, Random p_i45598_3_)
1346
        {
1347
            super(1, p_i45598_1_, p_i45598_2_, 2, 2, 2);
1348
        }
1349
1350
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
1351
        {
1352
            this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 8, 0, 14, 8, 14, field_175828_a);
1353
            int i = 7;
1354
            IBlockState iblockstate = field_175826_b;
1355
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, i, 0, 0, i, 15, iblockstate, iblockstate, false);
1356
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, i, 0, 15, i, 15, iblockstate, iblockstate, false);
1357
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 0, 15, i, 0, iblockstate, iblockstate, false);
1358
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 15, 14, i, 15, iblockstate, iblockstate, false);
1359
1360
            for (i = 1; i <= 6; ++i)
1361
            {
1362
                iblockstate = field_175826_b;
1363
1364
                if (i == 2 || i == 6)
1365
                {
1366
                    iblockstate = field_175828_a;
1367
                }
1368
1369
                for (int j = 0; j <= 15; j += 15)
1370
                {
1371
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j, i, 0, j, i, 1, iblockstate, iblockstate, false);
1372
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j, i, 6, j, i, 9, iblockstate, iblockstate, false);
1373
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j, i, 14, j, i, 15, iblockstate, iblockstate, false);
1374
                }
1375
1376
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 0, 1, i, 0, iblockstate, iblockstate, false);
1377
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, i, 0, 9, i, 0, iblockstate, iblockstate, false);
1378
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 14, i, 0, 14, i, 0, iblockstate, iblockstate, false);
1379
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, i, 15, 14, i, 15, iblockstate, iblockstate, false);
1380
            }
1381
1382
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 3, 6, 9, 6, 9, field_175827_c, field_175827_c, false);
1383
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 4, 7, 8, 5, 8, Blocks.gold_block.getDefaultState(), Blocks.gold_block.getDefaultState(), false);
1384
1385
            for (i = 3; i <= 6; i += 3)
1386
            {
1387
                for (int k = 6; k <= 9; k += 3)
1388
                {
1389
                    this.setBlockState(worldIn, field_175825_e, k, i, 6, structureBoundingBoxIn);
1390
                    this.setBlockState(worldIn, field_175825_e, k, i, 9, structureBoundingBoxIn);
1391
                }
1392
            }
1393
1394
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 6, 5, 2, 6, field_175826_b, field_175826_b, false);
1395
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 9, 5, 2, 9, field_175826_b, field_175826_b, false);
1396
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 1, 6, 10, 2, 6, field_175826_b, field_175826_b, false);
1397
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 1, 9, 10, 2, 9, field_175826_b, field_175826_b, false);
1398
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 5, 6, 2, 5, field_175826_b, field_175826_b, false);
1399
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 1, 5, 9, 2, 5, field_175826_b, field_175826_b, false);
1400
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 10, 6, 2, 10, field_175826_b, field_175826_b, false);
1401
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 1, 10, 9, 2, 10, field_175826_b, field_175826_b, false);
1402
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 2, 5, 5, 6, 5, field_175826_b, field_175826_b, false);
1403
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 2, 10, 5, 6, 10, field_175826_b, field_175826_b, false);
1404
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 2, 5, 10, 6, 5, field_175826_b, field_175826_b, false);
1405
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 2, 10, 10, 6, 10, field_175826_b, field_175826_b, false);
1406
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 7, 1, 5, 7, 6, field_175826_b, field_175826_b, false);
1407
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 7, 1, 10, 7, 6, field_175826_b, field_175826_b, false);
1408
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 7, 9, 5, 7, 14, field_175826_b, field_175826_b, false);
1409
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 7, 9, 10, 7, 14, field_175826_b, field_175826_b, false);
1410
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 7, 5, 6, 7, 5, field_175826_b, field_175826_b, false);
1411
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 7, 10, 6, 7, 10, field_175826_b, field_175826_b, false);
1412
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 7, 5, 14, 7, 5, field_175826_b, field_175826_b, false);
1413
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 7, 10, 14, 7, 10, field_175826_b, field_175826_b, false);
1414
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 2, 2, 1, 3, field_175826_b, field_175826_b, false);
1415
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 2, 3, 1, 2, field_175826_b, field_175826_b, false);
1416
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 1, 2, 13, 1, 3, field_175826_b, field_175826_b, false);
1417
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 12, 1, 2, 12, 1, 2, field_175826_b, field_175826_b, false);
1418
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 12, 2, 1, 13, field_175826_b, field_175826_b, false);
1419
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 13, 3, 1, 13, field_175826_b, field_175826_b, false);
1420
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 1, 12, 13, 1, 13, field_175826_b, field_175826_b, false);
1421
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 12, 1, 13, 12, 1, 13, field_175826_b, field_175826_b, false);
1422
            return true;
1423
        }
1424
    }
1425
1426
    interface MonumentRoomFitHelper
1427
    {
1428
        boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_);
1429
1430
        StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_);
1431
    }
1432
1433
    public static class Penthouse extends StructureOceanMonumentPieces.Piece
1434
    {
1435
        public Penthouse()
1436
        {
1437
        }
1438
1439
        public Penthouse(EnumFacing p_i45591_1_, StructureBoundingBox p_i45591_2_)
1440
        {
1441
            super(p_i45591_1_, p_i45591_2_);
1442
        }
1443
1444
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
1445
        {
1446
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, -1, 2, 11, -1, 11, field_175826_b, field_175826_b, false);
1447
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, -1, 0, 1, -1, 11, field_175828_a, field_175828_a, false);
1448
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 12, -1, 0, 13, -1, 11, field_175828_a, field_175828_a, false);
1449
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, -1, 0, 11, -1, 1, field_175828_a, field_175828_a, false);
1450
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, -1, 12, 11, -1, 13, field_175828_a, field_175828_a, false);
1451
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 0, 0, 0, 0, 13, field_175826_b, field_175826_b, false);
1452
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 0, 0, 13, 0, 13, field_175826_b, field_175826_b, false);
1453
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 0, 0, 12, 0, 0, field_175826_b, field_175826_b, false);
1454
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 0, 13, 12, 0, 13, field_175826_b, field_175826_b, false);
1455
1456
            for (int i = 2; i <= 11; i += 3)
1457
            {
1458
                this.setBlockState(worldIn, field_175825_e, 0, 0, i, structureBoundingBoxIn);
1459
                this.setBlockState(worldIn, field_175825_e, 13, 0, i, structureBoundingBoxIn);
1460
                this.setBlockState(worldIn, field_175825_e, i, 0, 0, structureBoundingBoxIn);
1461
            }
1462
1463
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 0, 3, 4, 0, 9, field_175826_b, field_175826_b, false);
1464
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 0, 3, 11, 0, 9, field_175826_b, field_175826_b, false);
1465
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 4, 0, 9, 9, 0, 11, field_175826_b, field_175826_b, false);
1466
            this.setBlockState(worldIn, field_175826_b, 5, 0, 8, structureBoundingBoxIn);
1467
            this.setBlockState(worldIn, field_175826_b, 8, 0, 8, structureBoundingBoxIn);
1468
            this.setBlockState(worldIn, field_175826_b, 10, 0, 10, structureBoundingBoxIn);
1469
            this.setBlockState(worldIn, field_175826_b, 3, 0, 10, structureBoundingBoxIn);
1470
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 0, 3, 3, 0, 7, field_175827_c, field_175827_c, false);
1471
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 0, 3, 10, 0, 7, field_175827_c, field_175827_c, false);
1472
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 0, 10, 7, 0, 10, field_175827_c, field_175827_c, false);
1473
            int l = 3;
1474
1475
            for (int j = 0; j < 2; ++j)
1476
            {
1477
                for (int k = 2; k <= 8; k += 3)
1478
                {
1479
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, l, 0, k, l, 2, k, field_175826_b, field_175826_b, false);
1480
                }
1481
1482
                l = 10;
1483
            }
1484
1485
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 0, 10, 5, 2, 10, field_175826_b, field_175826_b, false);
1486
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 0, 10, 8, 2, 10, field_175826_b, field_175826_b, false);
1487
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, -1, 7, 7, -1, 8, field_175827_c, field_175827_c, false);
1488
            this.func_181655_a(worldIn, structureBoundingBoxIn, 6, -1, 3, 7, -1, 4, false);
1489
            this.func_175817_a(worldIn, structureBoundingBoxIn, 6, 1, 6);
1490
            return true;
1491
        }
1492
    }
1493
1494
    public abstract static class Piece extends StructureComponent
1495
    {
1496
        protected static final IBlockState field_175828_a = Blocks.prismarine.getStateFromMeta(BlockPrismarine.ROUGH_META);
1497
        protected static final IBlockState field_175826_b = Blocks.prismarine.getStateFromMeta(BlockPrismarine.BRICKS_META);
1498
        protected static final IBlockState field_175827_c = Blocks.prismarine.getStateFromMeta(BlockPrismarine.DARK_META);
1499
        protected static final IBlockState field_175824_d = field_175826_b;
1500
        protected static final IBlockState field_175825_e = Blocks.sea_lantern.getDefaultState();
1501
        protected static final IBlockState field_175822_f = Blocks.water.getDefaultState();
1502
        protected static final int field_175823_g = func_175820_a(2, 0, 0);
1503
        protected static final int field_175831_h = func_175820_a(2, 2, 0);
1504
        protected static final int field_175832_i = func_175820_a(0, 1, 0);
1505
        protected static final int field_175829_j = func_175820_a(4, 1, 0);
1506
        protected StructureOceanMonumentPieces.RoomDefinition field_175830_k;
1507
1508
        protected static final int func_175820_a(int p_175820_0_, int p_175820_1_, int p_175820_2_)
1509
        {
1510
            return p_175820_1_ * 25 + p_175820_2_ * 5 + p_175820_0_;
1511
        }
1512
1513
        public Piece()
1514
        {
1515
            super(0);
1516
        }
1517
1518
        public Piece(int p_i45588_1_)
1519
        {
1520
            super(p_i45588_1_);
1521
        }
1522
1523
        public Piece(EnumFacing p_i45589_1_, StructureBoundingBox p_i45589_2_)
1524
        {
1525
            super(1);
1526
            this.coordBaseMode = p_i45589_1_;
1527
            this.boundingBox = p_i45589_2_;
1528
        }
1529
1530
        protected Piece(int p_i45590_1_, EnumFacing p_i45590_2_, StructureOceanMonumentPieces.RoomDefinition p_i45590_3_, int p_i45590_4_, int p_i45590_5_, int p_i45590_6_)
1531
        {
1532
            super(p_i45590_1_);
1533
            this.coordBaseMode = p_i45590_2_;
1534
            this.field_175830_k = p_i45590_3_;
1535
            int i = p_i45590_3_.field_175967_a;
1536
            int j = i % 5;
1537
            int k = i / 5 % 5;
1538
            int l = i / 25;
1539
1540
            if (p_i45590_2_ != EnumFacing.NORTH && p_i45590_2_ != EnumFacing.SOUTH)
1541
            {
1542
                this.boundingBox = new StructureBoundingBox(0, 0, 0, p_i45590_6_ * 8 - 1, p_i45590_5_ * 4 - 1, p_i45590_4_ * 8 - 1);
1543
            }
1544
            else
1545
            {
1546
                this.boundingBox = new StructureBoundingBox(0, 0, 0, p_i45590_4_ * 8 - 1, p_i45590_5_ * 4 - 1, p_i45590_6_ * 8 - 1);
1547
            }
1548
1549
            switch (p_i45590_2_)
1550
            {
1551
                case NORTH:
1552
                    this.boundingBox.offset(j * 8, l * 4, -(k + p_i45590_6_) * 8 + 1);
1553
                    break;
1554
1555
                case SOUTH:
1556
                    this.boundingBox.offset(j * 8, l * 4, k * 8);
1557
                    break;
1558
1559
                case WEST:
1560
                    this.boundingBox.offset(-(k + p_i45590_6_) * 8 + 1, l * 4, j * 8);
1561
                    break;
1562
1563
                default:
1564
                    this.boundingBox.offset(k * 8, l * 4, j * 8);
1565
            }
1566
        }
1567
1568
        protected void writeStructureToNBT(NBTTagCompound tagCompound)
1569
        {
1570
        }
1571
1572
        protected void readStructureFromNBT(NBTTagCompound tagCompound)
1573
        {
1574
        }
1575
1576
        protected void func_181655_a(World p_181655_1_, StructureBoundingBox p_181655_2_, int p_181655_3_, int p_181655_4_, int p_181655_5_, int p_181655_6_, int p_181655_7_, int p_181655_8_, boolean p_181655_9_)
1577
        {
1578
            for (int i = p_181655_4_; i <= p_181655_7_; ++i)
1579
            {
1580
                for (int j = p_181655_3_; j <= p_181655_6_; ++j)
1581
                {
1582
                    for (int k = p_181655_5_; k <= p_181655_8_; ++k)
1583
                    {
1584
                        if (!p_181655_9_ || this.getBlockStateFromPos(p_181655_1_, j, i, k, p_181655_2_).getBlock().getMaterial() != Material.air)
1585
                        {
1586
                            if (this.getYWithOffset(i) >= p_181655_1_.getSeaLevel())
1587
                            {
1588
                                this.setBlockState(p_181655_1_, Blocks.air.getDefaultState(), j, i, k, p_181655_2_);
1589
                            }
1590
                            else
1591
                            {
1592
                                this.setBlockState(p_181655_1_, field_175822_f, j, i, k, p_181655_2_);
1593
                            }
1594
                        }
1595
                    }
1596
                }
1597
            }
1598
        }
1599
1600
        protected void func_175821_a(World worldIn, StructureBoundingBox p_175821_2_, int p_175821_3_, int p_175821_4_, boolean p_175821_5_)
1601
        {
1602
            if (p_175821_5_)
1603
            {
1604
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 0, 0, p_175821_4_ + 0, p_175821_3_ + 2, 0, p_175821_4_ + 8 - 1, field_175828_a, field_175828_a, false);
1605
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 5, 0, p_175821_4_ + 0, p_175821_3_ + 8 - 1, 0, p_175821_4_ + 8 - 1, field_175828_a, field_175828_a, false);
1606
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 3, 0, p_175821_4_ + 0, p_175821_3_ + 4, 0, p_175821_4_ + 2, field_175828_a, field_175828_a, false);
1607
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 3, 0, p_175821_4_ + 5, p_175821_3_ + 4, 0, p_175821_4_ + 8 - 1, field_175828_a, field_175828_a, false);
1608
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 3, 0, p_175821_4_ + 2, p_175821_3_ + 4, 0, p_175821_4_ + 2, field_175826_b, field_175826_b, false);
1609
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 3, 0, p_175821_4_ + 5, p_175821_3_ + 4, 0, p_175821_4_ + 5, field_175826_b, field_175826_b, false);
1610
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 2, 0, p_175821_4_ + 3, p_175821_3_ + 2, 0, p_175821_4_ + 4, field_175826_b, field_175826_b, false);
1611
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 5, 0, p_175821_4_ + 3, p_175821_3_ + 5, 0, p_175821_4_ + 4, field_175826_b, field_175826_b, false);
1612
            }
1613
            else
1614
            {
1615
                this.fillWithBlocks(worldIn, p_175821_2_, p_175821_3_ + 0, 0, p_175821_4_ + 0, p_175821_3_ + 8 - 1, 0, p_175821_4_ + 8 - 1, field_175828_a, field_175828_a, false);
1616
            }
1617
        }
1618
1619
        protected void func_175819_a(World worldIn, StructureBoundingBox p_175819_2_, int p_175819_3_, int p_175819_4_, int p_175819_5_, int p_175819_6_, int p_175819_7_, int p_175819_8_, IBlockState p_175819_9_)
1620
        {
1621
            for (int i = p_175819_4_; i <= p_175819_7_; ++i)
1622
            {
1623
                for (int j = p_175819_3_; j <= p_175819_6_; ++j)
1624
                {
1625
                    for (int k = p_175819_5_; k <= p_175819_8_; ++k)
1626
                    {
1627
                        if (this.getBlockStateFromPos(worldIn, j, i, k, p_175819_2_) == field_175822_f)
1628
                        {
1629
                            this.setBlockState(worldIn, p_175819_9_, j, i, k, p_175819_2_);
1630
                        }
1631
                    }
1632
                }
1633
            }
1634
        }
1635
1636
        protected boolean func_175818_a(StructureBoundingBox p_175818_1_, int p_175818_2_, int p_175818_3_, int p_175818_4_, int p_175818_5_)
1637
        {
1638
            int i = this.getXWithOffset(p_175818_2_, p_175818_3_);
1639
            int j = this.getZWithOffset(p_175818_2_, p_175818_3_);
1640
            int k = this.getXWithOffset(p_175818_4_, p_175818_5_);
1641
            int l = this.getZWithOffset(p_175818_4_, p_175818_5_);
1642
            return p_175818_1_.intersectsWith(Math.min(i, k), Math.min(j, l), Math.max(i, k), Math.max(j, l));
1643
        }
1644
1645
        protected boolean func_175817_a(World worldIn, StructureBoundingBox p_175817_2_, int p_175817_3_, int p_175817_4_, int p_175817_5_)
1646
        {
1647
            int i = this.getXWithOffset(p_175817_3_, p_175817_5_);
1648
            int j = this.getYWithOffset(p_175817_4_);
1649
            int k = this.getZWithOffset(p_175817_3_, p_175817_5_);
1650
1651
            if (p_175817_2_.isVecInside(new BlockPos(i, j, k)))
1652
            {
1653
                EntityGuardian entityguardian = new EntityGuardian(worldIn);
1654
                entityguardian.setElder(true);
1655
                entityguardian.heal(entityguardian.getMaxHealth());
1656
                entityguardian.setLocationAndAngles((double)i + 0.5D, (double)j, (double)k + 0.5D, 0.0F, 0.0F);
1657
                entityguardian.onInitialSpawn(worldIn.getDifficultyForLocation(new BlockPos(entityguardian)), (IEntityLivingData)null);
1658
                worldIn.spawnEntityInWorld(entityguardian);
1659
                return true;
1660
            }
1661
            else
1662
            {
1663
                return false;
1664
            }
1665
        }
1666
    }
1667
1668
    static class RoomDefinition
1669
    {
1670
        int field_175967_a;
1671
        StructureOceanMonumentPieces.RoomDefinition[] field_175965_b = new StructureOceanMonumentPieces.RoomDefinition[6];
1672
        boolean[] field_175966_c = new boolean[6];
1673
        boolean field_175963_d;
1674
        boolean field_175964_e;
1675
        int field_175962_f;
1676
1677
        public RoomDefinition(int p_i45584_1_)
1678
        {
1679
            this.field_175967_a = p_i45584_1_;
1680
        }
1681
1682
        public void func_175957_a(EnumFacing p_175957_1_, StructureOceanMonumentPieces.RoomDefinition p_175957_2_)
1683
        {
1684
            this.field_175965_b[p_175957_1_.getIndex()] = p_175957_2_;
1685
            p_175957_2_.field_175965_b[p_175957_1_.getOpposite().getIndex()] = this;
1686
        }
1687
1688
        public void func_175958_a()
1689
        {
1690
            for (int i = 0; i < 6; ++i)
1691
            {
1692
                this.field_175966_c[i] = this.field_175965_b[i] != null;
1693
            }
1694
        }
1695
1696
        public boolean func_175959_a(int p_175959_1_)
1697
        {
1698
            if (this.field_175964_e)
1699
            {
1700
                return true;
1701
            }
1702
            else
1703
            {
1704
                this.field_175962_f = p_175959_1_;
1705
1706
                for (int i = 0; i < 6; ++i)
1707
                {
1708
                    if (this.field_175965_b[i] != null && this.field_175966_c[i] && this.field_175965_b[i].field_175962_f != p_175959_1_ && this.field_175965_b[i].func_175959_a(p_175959_1_))
1709
                    {
1710
                        return true;
1711
                    }
1712
                }
1713
1714
                return false;
1715
            }
1716
        }
1717
1718
        public boolean func_175961_b()
1719
        {
1720
            return this.field_175967_a >= 75;
1721
        }
1722
1723
        public int func_175960_c()
1724
        {
1725
            int i = 0;
1726
1727
            for (int j = 0; j < 6; ++j)
1728
            {
1729
                if (this.field_175966_c[j])
1730
                {
1731
                    ++i;
1732
                }
1733
            }
1734
1735
            return i;
1736
        }
1737
    }
1738
1739
    public static class SimpleRoom extends StructureOceanMonumentPieces.Piece
1740
    {
1741
        private int field_175833_o;
1742
1743
        public SimpleRoom()
1744
        {
1745
        }
1746
1747
        public SimpleRoom(EnumFacing p_i45587_1_, StructureOceanMonumentPieces.RoomDefinition p_i45587_2_, Random p_i45587_3_)
1748
        {
1749
            super(1, p_i45587_1_, p_i45587_2_, 1, 1, 1);
1750
            this.field_175833_o = p_i45587_3_.nextInt(3);
1751
        }
1752
1753
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
1754
        {
1755
            if (this.field_175830_k.field_175967_a / 25 > 0)
1756
            {
1757
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, this.field_175830_k.field_175966_c[EnumFacing.DOWN.getIndex()]);
1758
            }
1759
1760
            if (this.field_175830_k.field_175965_b[EnumFacing.UP.getIndex()] == null)
1761
            {
1762
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 4, 1, 6, 4, 6, field_175828_a);
1763
            }
1764
1765
            boolean flag = this.field_175833_o != 0 && randomIn.nextBoolean() && !this.field_175830_k.field_175966_c[EnumFacing.DOWN.getIndex()] && !this.field_175830_k.field_175966_c[EnumFacing.UP.getIndex()] && this.field_175830_k.func_175960_c() > 1;
1766
1767
            if (this.field_175833_o == 0)
1768
            {
1769
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 2, 1, 2, field_175826_b, field_175826_b, false);
1770
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 2, 3, 2, field_175826_b, field_175826_b, false);
1771
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 2, 2, field_175828_a, field_175828_a, false);
1772
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 0, 2, 2, 0, field_175828_a, field_175828_a, false);
1773
                this.setBlockState(worldIn, field_175825_e, 1, 2, 1, structureBoundingBoxIn);
1774
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 0, 7, 1, 2, field_175826_b, field_175826_b, false);
1775
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 3, 0, 7, 3, 2, field_175826_b, field_175826_b, false);
1776
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 0, 7, 2, 2, field_175828_a, field_175828_a, false);
1777
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 2, 0, 6, 2, 0, field_175828_a, field_175828_a, false);
1778
                this.setBlockState(worldIn, field_175825_e, 6, 2, 1, structureBoundingBoxIn);
1779
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 5, 2, 1, 7, field_175826_b, field_175826_b, false);
1780
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 5, 2, 3, 7, field_175826_b, field_175826_b, false);
1781
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 5, 0, 2, 7, field_175828_a, field_175828_a, false);
1782
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 7, 2, 2, 7, field_175828_a, field_175828_a, false);
1783
                this.setBlockState(worldIn, field_175825_e, 1, 2, 6, structureBoundingBoxIn);
1784
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 5, 7, 1, 7, field_175826_b, field_175826_b, false);
1785
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 3, 5, 7, 3, 7, field_175826_b, field_175826_b, false);
1786
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 5, 7, 2, 7, field_175828_a, field_175828_a, false);
1787
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 2, 7, 6, 2, 7, field_175828_a, field_175828_a, false);
1788
                this.setBlockState(worldIn, field_175825_e, 6, 2, 6, structureBoundingBoxIn);
1789
1790
                if (this.field_175830_k.field_175966_c[EnumFacing.SOUTH.getIndex()])
1791
                {
1792
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 0, 4, 3, 0, field_175826_b, field_175826_b, false);
1793
                }
1794
                else
1795
                {
1796
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 0, 4, 3, 1, field_175826_b, field_175826_b, false);
1797
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 2, 0, 4, 2, 0, field_175828_a, field_175828_a, false);
1798
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 1, 1, field_175826_b, field_175826_b, false);
1799
                }
1800
1801
                if (this.field_175830_k.field_175966_c[EnumFacing.NORTH.getIndex()])
1802
                {
1803
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 7, 4, 3, 7, field_175826_b, field_175826_b, false);
1804
                }
1805
                else
1806
                {
1807
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 6, 4, 3, 7, field_175826_b, field_175826_b, false);
1808
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 2, 7, 4, 2, 7, field_175828_a, field_175828_a, false);
1809
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 6, 4, 1, 7, field_175826_b, field_175826_b, false);
1810
                }
1811
1812
                if (this.field_175830_k.field_175966_c[EnumFacing.WEST.getIndex()])
1813
                {
1814
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 3, 0, 3, 4, field_175826_b, field_175826_b, false);
1815
                }
1816
                else
1817
                {
1818
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 3, 1, 3, 4, field_175826_b, field_175826_b, false);
1819
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 3, 0, 2, 4, field_175828_a, field_175828_a, false);
1820
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 3, 1, 1, 4, field_175826_b, field_175826_b, false);
1821
                }
1822
1823
                if (this.field_175830_k.field_175966_c[EnumFacing.EAST.getIndex()])
1824
                {
1825
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 3, 3, 7, 3, 4, field_175826_b, field_175826_b, false);
1826
                }
1827
                else
1828
                {
1829
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 3, 3, 7, 3, 4, field_175826_b, field_175826_b, false);
1830
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 3, 7, 2, 4, field_175828_a, field_175828_a, false);
1831
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 3, 7, 1, 4, field_175826_b, field_175826_b, false);
1832
                }
1833
            }
1834
            else if (this.field_175833_o == 1)
1835
            {
1836
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 2, 2, 3, 2, field_175826_b, field_175826_b, false);
1837
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 2, 1, 5, 2, 3, 5, field_175826_b, field_175826_b, false);
1838
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 5, 5, 3, 5, field_175826_b, field_175826_b, false);
1839
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 5, 1, 2, 5, 3, 2, field_175826_b, field_175826_b, false);
1840
                this.setBlockState(worldIn, field_175825_e, 2, 2, 2, structureBoundingBoxIn);
1841
                this.setBlockState(worldIn, field_175825_e, 2, 2, 5, structureBoundingBoxIn);
1842
                this.setBlockState(worldIn, field_175825_e, 5, 2, 5, structureBoundingBoxIn);
1843
                this.setBlockState(worldIn, field_175825_e, 5, 2, 2, structureBoundingBoxIn);
1844
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 1, 3, 0, field_175826_b, field_175826_b, false);
1845
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 1, 0, 3, 1, field_175826_b, field_175826_b, false);
1846
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 7, 1, 3, 7, field_175826_b, field_175826_b, false);
1847
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 6, 0, 3, 6, field_175826_b, field_175826_b, false);
1848
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 7, 7, 3, 7, field_175826_b, field_175826_b, false);
1849
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 6, 7, 3, 6, field_175826_b, field_175826_b, false);
1850
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 1, 0, 7, 3, 0, field_175826_b, field_175826_b, false);
1851
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 1, 7, 3, 1, field_175826_b, field_175826_b, false);
1852
                this.setBlockState(worldIn, field_175828_a, 1, 2, 0, structureBoundingBoxIn);
1853
                this.setBlockState(worldIn, field_175828_a, 0, 2, 1, structureBoundingBoxIn);
1854
                this.setBlockState(worldIn, field_175828_a, 1, 2, 7, structureBoundingBoxIn);
1855
                this.setBlockState(worldIn, field_175828_a, 0, 2, 6, structureBoundingBoxIn);
1856
                this.setBlockState(worldIn, field_175828_a, 6, 2, 7, structureBoundingBoxIn);
1857
                this.setBlockState(worldIn, field_175828_a, 7, 2, 6, structureBoundingBoxIn);
1858
                this.setBlockState(worldIn, field_175828_a, 6, 2, 0, structureBoundingBoxIn);
1859
                this.setBlockState(worldIn, field_175828_a, 7, 2, 1, structureBoundingBoxIn);
1860
1861
                if (!this.field_175830_k.field_175966_c[EnumFacing.SOUTH.getIndex()])
1862
                {
1863
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 0, 6, 3, 0, field_175826_b, field_175826_b, false);
1864
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 0, 6, 2, 0, field_175828_a, field_175828_a, false);
1865
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 0, 6, 1, 0, field_175826_b, field_175826_b, false);
1866
                }
1867
1868
                if (!this.field_175830_k.field_175966_c[EnumFacing.NORTH.getIndex()])
1869
                {
1870
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 7, 6, 3, 7, field_175826_b, field_175826_b, false);
1871
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 7, 6, 2, 7, field_175828_a, field_175828_a, false);
1872
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 7, 6, 1, 7, field_175826_b, field_175826_b, false);
1873
                }
1874
1875
                if (!this.field_175830_k.field_175966_c[EnumFacing.WEST.getIndex()])
1876
                {
1877
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 1, 0, 3, 6, field_175826_b, field_175826_b, false);
1878
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 1, 0, 2, 6, field_175828_a, field_175828_a, false);
1879
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 1, 0, 1, 6, field_175826_b, field_175826_b, false);
1880
                }
1881
1882
                if (!this.field_175830_k.field_175966_c[EnumFacing.EAST.getIndex()])
1883
                {
1884
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 3, 1, 7, 3, 6, field_175826_b, field_175826_b, false);
1885
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 1, 7, 2, 6, field_175828_a, field_175828_a, false);
1886
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 1, 7, 1, 6, field_175826_b, field_175826_b, false);
1887
                }
1888
            }
1889
            else if (this.field_175833_o == 2)
1890
            {
1891
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 0, 1, 7, field_175826_b, field_175826_b, false);
1892
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 0, 7, 1, 7, field_175826_b, field_175826_b, false);
1893
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 0, 6, 1, 0, field_175826_b, field_175826_b, false);
1894
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 7, 6, 1, 7, field_175826_b, field_175826_b, false);
1895
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 2, 7, field_175827_c, field_175827_c, false);
1896
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 0, 7, 2, 7, field_175827_c, field_175827_c, false);
1897
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 0, 6, 2, 0, field_175827_c, field_175827_c, false);
1898
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 7, 6, 2, 7, field_175827_c, field_175827_c, false);
1899
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 0, 3, 7, field_175826_b, field_175826_b, false);
1900
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 3, 0, 7, 3, 7, field_175826_b, field_175826_b, false);
1901
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 0, 6, 3, 0, field_175826_b, field_175826_b, false);
1902
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 7, 6, 3, 7, field_175826_b, field_175826_b, false);
1903
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, field_175827_c, field_175827_c, false);
1904
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 3, 7, 2, 4, field_175827_c, field_175827_c, false);
1905
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, field_175827_c, field_175827_c, false);
1906
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 7, 4, 2, 7, field_175827_c, field_175827_c, false);
1907
1908
                if (this.field_175830_k.field_175966_c[EnumFacing.SOUTH.getIndex()])
1909
                {
1910
                    this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, false);
1911
                }
1912
1913
                if (this.field_175830_k.field_175966_c[EnumFacing.NORTH.getIndex()])
1914
                {
1915
                    this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 7, 4, 2, 7, false);
1916
                }
1917
1918
                if (this.field_175830_k.field_175966_c[EnumFacing.WEST.getIndex()])
1919
                {
1920
                    this.func_181655_a(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, false);
1921
                }
1922
1923
                if (this.field_175830_k.field_175966_c[EnumFacing.EAST.getIndex()])
1924
                {
1925
                    this.func_181655_a(worldIn, structureBoundingBoxIn, 7, 1, 3, 7, 2, 4, false);
1926
                }
1927
            }
1928
1929
            if (flag)
1930
            {
1931
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 3, 4, 1, 4, field_175826_b, field_175826_b, false);
1932
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 2, 3, 4, 2, 4, field_175828_a, field_175828_a, false);
1933
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 3, 3, 4, 3, 4, field_175826_b, field_175826_b, false);
1934
            }
1935
1936
            return true;
1937
        }
1938
    }
1939
1940
    public static class SimpleTopRoom extends StructureOceanMonumentPieces.Piece
1941
    {
1942
        public SimpleTopRoom()
1943
        {
1944
        }
1945
1946
        public SimpleTopRoom(EnumFacing p_i45586_1_, StructureOceanMonumentPieces.RoomDefinition p_i45586_2_, Random p_i45586_3_)
1947
        {
1948
            super(1, p_i45586_1_, p_i45586_2_, 1, 1, 1);
1949
        }
1950
1951
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
1952
        {
1953
            if (this.field_175830_k.field_175967_a / 25 > 0)
1954
            {
1955
                this.func_175821_a(worldIn, structureBoundingBoxIn, 0, 0, this.field_175830_k.field_175966_c[EnumFacing.DOWN.getIndex()]);
1956
            }
1957
1958
            if (this.field_175830_k.field_175965_b[EnumFacing.UP.getIndex()] == null)
1959
            {
1960
                this.func_175819_a(worldIn, structureBoundingBoxIn, 1, 4, 1, 6, 4, 6, field_175828_a);
1961
            }
1962
1963
            for (int i = 1; i <= 6; ++i)
1964
            {
1965
                for (int j = 1; j <= 6; ++j)
1966
                {
1967
                    if (randomIn.nextInt(3) != 0)
1968
                    {
1969
                        int k = 2 + (randomIn.nextInt(4) == 0 ? 0 : 1);
1970
                        this.fillWithBlocks(worldIn, structureBoundingBoxIn, i, k, j, i, 3, j, Blocks.sponge.getStateFromMeta(1), Blocks.sponge.getStateFromMeta(1), false);
1971
                    }
1972
                }
1973
            }
1974
1975
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 0, 0, 1, 7, field_175826_b, field_175826_b, false);
1976
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 0, 7, 1, 7, field_175826_b, field_175826_b, false);
1977
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 0, 6, 1, 0, field_175826_b, field_175826_b, false);
1978
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 1, 7, 6, 1, 7, field_175826_b, field_175826_b, false);
1979
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 2, 0, 0, 2, 7, field_175827_c, field_175827_c, false);
1980
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 2, 0, 7, 2, 7, field_175827_c, field_175827_c, false);
1981
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 0, 6, 2, 0, field_175827_c, field_175827_c, false);
1982
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 2, 7, 6, 2, 7, field_175827_c, field_175827_c, false);
1983
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 3, 0, 0, 3, 7, field_175826_b, field_175826_b, false);
1984
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 3, 0, 7, 3, 7, field_175826_b, field_175826_b, false);
1985
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 0, 6, 3, 0, field_175826_b, field_175826_b, false);
1986
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 1, 3, 7, 6, 3, 7, field_175826_b, field_175826_b, false);
1987
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 0, 1, 3, 0, 2, 4, field_175827_c, field_175827_c, false);
1988
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 3, 7, 2, 4, field_175827_c, field_175827_c, false);
1989
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, field_175827_c, field_175827_c, false);
1990
            this.fillWithBlocks(worldIn, structureBoundingBoxIn, 3, 1, 7, 4, 2, 7, field_175827_c, field_175827_c, false);
1991
1992
            if (this.field_175830_k.field_175966_c[EnumFacing.SOUTH.getIndex()])
1993
            {
1994
                this.func_181655_a(worldIn, structureBoundingBoxIn, 3, 1, 0, 4, 2, 0, false);
1995
            }
1996
1997
            return true;
1998
        }
1999
    }
2000
2001
    public static class WingRoom extends StructureOceanMonumentPieces.Piece
2002
    {
2003
        private int field_175834_o;
2004
2005
        public WingRoom()
2006
        {
2007
        }
2008
2009
        public WingRoom(EnumFacing p_i45585_1_, StructureBoundingBox p_i45585_2_, int p_i45585_3_)
2010
        {
2011
            super(p_i45585_1_, p_i45585_2_);
2012
            this.field_175834_o = p_i45585_3_ & 1;
2013
        }
2014
2015
        public boolean addComponentParts(World worldIn, Random randomIn, StructureBoundingBox structureBoundingBoxIn)
2016
        {
2017
            if (this.field_175834_o == 0)
2018
            {
2019
                for (int i = 0; i < 4; ++i)
2020
                {
2021
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10 - i, 3 - i, 20 - i, 12 + i, 3 - i, 20, field_175826_b, field_175826_b, false);
2022
                }
2023
2024
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 0, 6, 15, 0, 16, field_175826_b, field_175826_b, false);
2025
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 0, 6, 6, 3, 20, field_175826_b, field_175826_b, false);
2026
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 16, 0, 6, 16, 3, 20, field_175826_b, field_175826_b, false);
2027
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 7, 7, 1, 20, field_175826_b, field_175826_b, false);
2028
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, 1, 7, 15, 1, 20, field_175826_b, field_175826_b, false);
2029
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 1, 6, 9, 3, 6, field_175826_b, field_175826_b, false);
2030
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 1, 6, 15, 3, 6, field_175826_b, field_175826_b, false);
2031
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 1, 7, 9, 1, 7, field_175826_b, field_175826_b, false);
2032
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 1, 7, 14, 1, 7, field_175826_b, field_175826_b, false);
2033
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 0, 5, 13, 0, 5, field_175826_b, field_175826_b, false);
2034
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 10, 0, 7, 12, 0, 7, field_175827_c, field_175827_c, false);
2035
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 0, 10, 8, 0, 12, field_175827_c, field_175827_c, false);
2036
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 14, 0, 10, 14, 0, 12, field_175827_c, field_175827_c, false);
2037
2038
                for (int i1 = 18; i1 >= 7; i1 -= 3)
2039
                {
2040
                    this.setBlockState(worldIn, field_175825_e, 6, 3, i1, structureBoundingBoxIn);
2041
                    this.setBlockState(worldIn, field_175825_e, 16, 3, i1, structureBoundingBoxIn);
2042
                }
2043
2044
                this.setBlockState(worldIn, field_175825_e, 10, 0, 10, structureBoundingBoxIn);
2045
                this.setBlockState(worldIn, field_175825_e, 12, 0, 10, structureBoundingBoxIn);
2046
                this.setBlockState(worldIn, field_175825_e, 10, 0, 12, structureBoundingBoxIn);
2047
                this.setBlockState(worldIn, field_175825_e, 12, 0, 12, structureBoundingBoxIn);
2048
                this.setBlockState(worldIn, field_175825_e, 8, 3, 6, structureBoundingBoxIn);
2049
                this.setBlockState(worldIn, field_175825_e, 14, 3, 6, structureBoundingBoxIn);
2050
                this.setBlockState(worldIn, field_175826_b, 4, 2, 4, structureBoundingBoxIn);
2051
                this.setBlockState(worldIn, field_175825_e, 4, 1, 4, structureBoundingBoxIn);
2052
                this.setBlockState(worldIn, field_175826_b, 4, 0, 4, structureBoundingBoxIn);
2053
                this.setBlockState(worldIn, field_175826_b, 18, 2, 4, structureBoundingBoxIn);
2054
                this.setBlockState(worldIn, field_175825_e, 18, 1, 4, structureBoundingBoxIn);
2055
                this.setBlockState(worldIn, field_175826_b, 18, 0, 4, structureBoundingBoxIn);
2056
                this.setBlockState(worldIn, field_175826_b, 4, 2, 18, structureBoundingBoxIn);
2057
                this.setBlockState(worldIn, field_175825_e, 4, 1, 18, structureBoundingBoxIn);
2058
                this.setBlockState(worldIn, field_175826_b, 4, 0, 18, structureBoundingBoxIn);
2059
                this.setBlockState(worldIn, field_175826_b, 18, 2, 18, structureBoundingBoxIn);
2060
                this.setBlockState(worldIn, field_175825_e, 18, 1, 18, structureBoundingBoxIn);
2061
                this.setBlockState(worldIn, field_175826_b, 18, 0, 18, structureBoundingBoxIn);
2062
                this.setBlockState(worldIn, field_175826_b, 9, 7, 20, structureBoundingBoxIn);
2063
                this.setBlockState(worldIn, field_175826_b, 13, 7, 20, structureBoundingBoxIn);
2064
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 6, 0, 21, 7, 4, 21, field_175826_b, field_175826_b, false);
2065
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 15, 0, 21, 16, 4, 21, field_175826_b, field_175826_b, false);
2066
                this.func_175817_a(worldIn, structureBoundingBoxIn, 11, 2, 16);
2067
            }
2068
            else if (this.field_175834_o == 1)
2069
            {
2070
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 3, 18, 13, 3, 20, field_175826_b, field_175826_b, false);
2071
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 9, 0, 18, 9, 2, 18, field_175826_b, field_175826_b, false);
2072
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 13, 0, 18, 13, 2, 18, field_175826_b, field_175826_b, false);
2073
                int j1 = 9;
2074
                int j = 20;
2075
                int k = 5;
2076
2077
                for (int l = 0; l < 2; ++l)
2078
                {
2079
                    this.setBlockState(worldIn, field_175826_b, j1, k + 1, j, structureBoundingBoxIn);
2080
                    this.setBlockState(worldIn, field_175825_e, j1, k, j, structureBoundingBoxIn);
2081
                    this.setBlockState(worldIn, field_175826_b, j1, k - 1, j, structureBoundingBoxIn);
2082
                    j1 = 13;
2083
                }
2084
2085
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 7, 3, 7, 15, 3, 14, field_175826_b, field_175826_b, false);
2086
                j1 = 10;
2087
2088
                for (int k1 = 0; k1 < 2; ++k1)
2089
                {
2090
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j1, 0, 10, j1, 6, 10, field_175826_b, field_175826_b, false);
2091
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j1, 0, 12, j1, 6, 12, field_175826_b, field_175826_b, false);
2092
                    this.setBlockState(worldIn, field_175825_e, j1, 0, 10, structureBoundingBoxIn);
2093
                    this.setBlockState(worldIn, field_175825_e, j1, 0, 12, structureBoundingBoxIn);
2094
                    this.setBlockState(worldIn, field_175825_e, j1, 4, 10, structureBoundingBoxIn);
2095
                    this.setBlockState(worldIn, field_175825_e, j1, 4, 12, structureBoundingBoxIn);
2096
                    j1 = 12;
2097
                }
2098
2099
                j1 = 8;
2100
2101
                for (int l1 = 0; l1 < 2; ++l1)
2102
                {
2103
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j1, 0, 7, j1, 2, 7, field_175826_b, field_175826_b, false);
2104
                    this.fillWithBlocks(worldIn, structureBoundingBoxIn, j1, 0, 14, j1, 2, 14, field_175826_b, field_175826_b, false);
2105
                    j1 = 14;
2106
                }
2107
2108
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 8, 3, 8, 8, 3, 13, field_175827_c, field_175827_c, false);
2109
                this.fillWithBlocks(worldIn, structureBoundingBoxIn, 14, 3, 8, 14, 3, 13, field_175827_c, field_175827_c, false);
2110
                this.func_175817_a(worldIn, structureBoundingBoxIn, 11, 5, 13);
2111
            }
2112
2113
            return true;
2114
        }
2115
    }
2116
2117
    static class XDoubleRoomFitHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
2118
    {
2119
        private XDoubleRoomFitHelper()
2120
        {
2121
        }
2122
2123
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
2124
        {
2125
            return p_175969_1_.field_175966_c[EnumFacing.EAST.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.EAST.getIndex()].field_175963_d;
2126
        }
2127
2128
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
2129
        {
2130
            p_175968_2_.field_175963_d = true;
2131
            p_175968_2_.field_175965_b[EnumFacing.EAST.getIndex()].field_175963_d = true;
2132
            return new StructureOceanMonumentPieces.DoubleXRoom(p_175968_1_, p_175968_2_, p_175968_3_);
2133
        }
2134
    }
2135
2136
    static class XYDoubleRoomFitHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
2137
    {
2138
        private XYDoubleRoomFitHelper()
2139
        {
2140
        }
2141
2142
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
2143
        {
2144
            if (p_175969_1_.field_175966_c[EnumFacing.EAST.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.EAST.getIndex()].field_175963_d && p_175969_1_.field_175966_c[EnumFacing.UP.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d)
2145
            {
2146
                StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = p_175969_1_.field_175965_b[EnumFacing.EAST.getIndex()];
2147
                return structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.UP.getIndex()] && !structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d;
2148
            }
2149
            else
2150
            {
2151
                return false;
2152
            }
2153
        }
2154
2155
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
2156
        {
2157
            p_175968_2_.field_175963_d = true;
2158
            p_175968_2_.field_175965_b[EnumFacing.EAST.getIndex()].field_175963_d = true;
2159
            p_175968_2_.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
2160
            p_175968_2_.field_175965_b[EnumFacing.EAST.getIndex()].field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
2161
            return new StructureOceanMonumentPieces.DoubleXYRoom(p_175968_1_, p_175968_2_, p_175968_3_);
2162
        }
2163
    }
2164
2165
    static class YDoubleRoomFitHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
2166
    {
2167
        private YDoubleRoomFitHelper()
2168
        {
2169
        }
2170
2171
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
2172
        {
2173
            return p_175969_1_.field_175966_c[EnumFacing.UP.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d;
2174
        }
2175
2176
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
2177
        {
2178
            p_175968_2_.field_175963_d = true;
2179
            p_175968_2_.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
2180
            return new StructureOceanMonumentPieces.DoubleYRoom(p_175968_1_, p_175968_2_, p_175968_3_);
2181
        }
2182
    }
2183
2184
    static class YZDoubleRoomFitHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
2185
    {
2186
        private YZDoubleRoomFitHelper()
2187
        {
2188
        }
2189
2190
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
2191
        {
2192
            if (p_175969_1_.field_175966_c[EnumFacing.NORTH.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d && p_175969_1_.field_175966_c[EnumFacing.UP.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d)
2193
            {
2194
                StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = p_175969_1_.field_175965_b[EnumFacing.NORTH.getIndex()];
2195
                return structureoceanmonumentpieces$roomdefinition.field_175966_c[EnumFacing.UP.getIndex()] && !structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d;
2196
            }
2197
            else
2198
            {
2199
                return false;
2200
            }
2201
        }
2202
2203
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
2204
        {
2205
            p_175968_2_.field_175963_d = true;
2206
            p_175968_2_.field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d = true;
2207
            p_175968_2_.field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
2208
            p_175968_2_.field_175965_b[EnumFacing.NORTH.getIndex()].field_175965_b[EnumFacing.UP.getIndex()].field_175963_d = true;
2209
            return new StructureOceanMonumentPieces.DoubleYZRoom(p_175968_1_, p_175968_2_, p_175968_3_);
2210
        }
2211
    }
2212
2213
    static class ZDoubleRoomFitHelper implements StructureOceanMonumentPieces.MonumentRoomFitHelper
2214
    {
2215
        private ZDoubleRoomFitHelper()
2216
        {
2217
        }
2218
2219
        public boolean func_175969_a(StructureOceanMonumentPieces.RoomDefinition p_175969_1_)
2220
        {
2221
            return p_175969_1_.field_175966_c[EnumFacing.NORTH.getIndex()] && !p_175969_1_.field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d;
2222
        }
2223
2224
        public StructureOceanMonumentPieces.Piece func_175968_a(EnumFacing p_175968_1_, StructureOceanMonumentPieces.RoomDefinition p_175968_2_, Random p_175968_3_)
2225
        {
2226
            StructureOceanMonumentPieces.RoomDefinition structureoceanmonumentpieces$roomdefinition = p_175968_2_;
2227
2228
            if (!p_175968_2_.field_175966_c[EnumFacing.NORTH.getIndex()] || p_175968_2_.field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d)
2229
            {
2230
                structureoceanmonumentpieces$roomdefinition = p_175968_2_.field_175965_b[EnumFacing.SOUTH.getIndex()];
2231
            }
2232
2233
            structureoceanmonumentpieces$roomdefinition.field_175963_d = true;
2234
            structureoceanmonumentpieces$roomdefinition.field_175965_b[EnumFacing.NORTH.getIndex()].field_175963_d = true;
2235
            return new StructureOceanMonumentPieces.DoubleZRoom(p_175968_1_, structureoceanmonumentpieces$roomdefinition, p_175968_3_);
2236
        }
2237
    }
2238
}
2239

Deobfuscated MCP 1.8.9 source of StructureOceanMonumentPieces from Marcelektro/MavenMCP-1.8.9 (net/minecraft/world/gen/structure/StructureOceanMonumentPieces.java), stored verbatim.