public static StructureComponent canFitInside(List <StructureComponent> list, StructureBoundingBox structureboundingbox)
        {
            for (IEnumerator <StructureComponent> iterator = list.GetEnumerator(); iterator.MoveNext();)
            {
                StructureComponent structurecomponent = (StructureComponent)iterator.Current;
                if (structurecomponent.getStructureBoundingBox() != null && structurecomponent.getStructureBoundingBox().canFitInside(structureboundingbox))
                {
                    return(structurecomponent);
                }
            }

            return(null);
        }
        public void generateStructure(World world, java.util.Random random, StructureBoundingBox structureboundingbox)
        {
            IEnumerator <StructureComponent> iterator = new LinkedList <StructureComponent>(components).GetEnumerator();

            do
            {
                if (!iterator.MoveNext())
                {
                    break;
                }
                StructureComponent structurecomponent = (StructureComponent)iterator.Current;
                if (structurecomponent.getStructureBoundingBox().canFitInside(structureboundingbox) && !structurecomponent.addComponentParts(world, random, structureboundingbox))
                {
                    components.Remove(iterator.Current);
                }
            } while (true);
        }
Exemple #3
0
        private static StructureComponent getNextMineShaftComponent(StructureComponent structurecomponent, List <StructureComponent> list, java.util.Random random, int i, int j, int k, int l, int i1)
        {
            if (i1 > 8)
            {
                return(null);
            }
            if (Math.Abs(i - structurecomponent.getStructureBoundingBox().x1) > 80 || Math.Abs(k - structurecomponent.getStructureBoundingBox().z1) > 80)
            {
                return(null);
            }
            StructureComponent structurecomponent1 = getRandomComponent(list, random, i, j, k, l, i1 + 1);

            if (structurecomponent1 != null)
            {
                list.Add(structurecomponent1);
                structurecomponent1.buildComponent(structurecomponent, list, random);
            }
            return(structurecomponent1);
        }
 public void buildComponent(StructureComponent structurecomponent, List <StructureComponent> list, java.util.Random random)
 {
 }
 public void buildComponent(StructureComponent structurecomponent, List<StructureComponent> list, java.util.Random random)
 {
 }
Exemple #6
0
 static StructureComponent getNextComponent(StructureComponent structurecomponent, List <StructureComponent> list, java.util.Random random, int i, int j, int k, int l, int i1)
 {
     return(getNextMineShaftComponent(structurecomponent, list, random, i, j, k, l, i1));
 }