Java 类net.minecraft.world.gen.structure.StructureComponent 实例源码

项目:4Space-5    文件:StructureComponentVillage.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
protected StructureComponent getNextComponentNN(StructureComponentVillageStartPiece par1ComponentVillageStartPiece, List par2List, Random par3Random, int par4, int par5)
{
    switch (this.coordBaseMode)
    {
    case 0:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX - 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 1, this.getComponentType());
    case 1:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.minZ - 1, 2, this.getComponentType());
    case 2:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX - 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 1, this.getComponentType());
    case 3:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.minZ - 1, 2, this.getComponentType());
    default:
        return null;
    }
}
项目:4Space-5    文件:StructureComponentVillage.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
protected StructureComponent getNextComponentPP(StructureComponentVillageStartPiece par1ComponentVillageStartPiece, List par2List, Random par3Random, int par4, int par5)
{
    switch (this.coordBaseMode)
    {
    case 0:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.maxX + 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 3, this.getComponentType());
    case 1:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.maxZ + 1, 0, this.getComponentType());
    case 2:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.maxX + 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 3, this.getComponentType());
    case 3:
        return StructureVillagePiecesMoon.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.maxZ + 1, 0, this.getComponentType());
    default:
        return null;
    }
}
项目:4Space-5    文件:StructureVillagePiecesMoon.java   
private static StructureComponentVillage func_75083_a(StructureComponentVillageStartPiece par0ComponentVillageStartPiece, StructureVillagePieceWeightMoon par1StructureVillagePieceWeight, List<StructureComponent> par2List, Random par3Random, int par4, int par5, int par6, int par7, int par8)
  {
      final Class<?> var9 = par1StructureVillagePieceWeight.villagePieceClass;
      Object var10 = null;

      if (var9 == StructureComponentVillageWoodHut.class)
      {
          var10 = StructureComponentVillageWoodHut.func_74908_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
      }
      else if (var9 == StructureComponentVillageField.class)
      {
          var10 = StructureComponentVillageField.func_74900_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
      }
else if (var9 == StructureComponentVillageField2.class)
      {
          var10 = StructureComponentVillageField2.func_74900_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
      }
      else if (var9 == StructureComponentVillageHouse.class)
      {
          var10 = StructureComponentVillageHouse.func_74921_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
      }

      return (StructureComponentVillage) var10;
  }
项目:4Space-5    文件:StructureVillagePiecesMoon.java   
/**
 * attempts to find a next Structure Component to be spawned, private
 * Village function
 */
private static StructureComponent getNextVillageStructureComponent(StructureComponentVillageStartPiece par0ComponentVillageStartPiece, List<StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7)
{
    if (par7 > 50)
    {
        return null;
    }
    else if (Math.abs(par3 - par0ComponentVillageStartPiece.getBoundingBox().minX) <= 112 && Math.abs(par5 - par0ComponentVillageStartPiece.getBoundingBox().minZ) <= 112)
    {
        final StructureComponentVillage var8 = StructureVillagePiecesMoon.getNextVillageComponent(par0ComponentVillageStartPiece, par1List, par2Random, par3, par4, par5, par6, par7 + 1);

        if (var8 != null)
        {
            par1List.add(var8);
            par0ComponentVillageStartPiece.field_74932_i.add(var8);
            return var8;
        }

        return null;
    }
    else
    {
        return null;
    }
}
项目:4Space-5    文件:StructureVillagePiecesMoon.java   
private static StructureComponent getNextComponentVillagePath(StructureComponentVillageStartPiece par0ComponentVillageStartPiece, List<StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7)
{
    if (par7 > 3 + par0ComponentVillageStartPiece.terrainType)
    {
        return null;
    }
    else if (Math.abs(par3 - par0ComponentVillageStartPiece.getBoundingBox().minX) <= 112 && Math.abs(par5 - par0ComponentVillageStartPiece.getBoundingBox().minZ) <= 112)
    {
        final StructureBoundingBox var8 = StructureComponentVillagePathGen.func_74933_a(par0ComponentVillageStartPiece, par1List, par2Random, par3, par4, par5, par6);

        if (var8 != null && var8.minY > 10)
        {
            final StructureComponentVillagePathGen var9 = new StructureComponentVillagePathGen(par0ComponentVillageStartPiece, par7, par2Random, var8, par6);

            par1List.add(var9);
            par0ComponentVillageStartPiece.field_74930_j.add(var9);
            return var9;
        }

        return null;
    }
    else
    {
        return null;
    }
}
项目:4Space-5    文件:VillageStructurePieces.java   
private static VillageStructureComponent func_75083_a(VillageStructureComponentStartPiece par0ComponentVillageStartPiece, VillageStructurePieceWeight par1StructureVillagePieceWeight, List<StructureComponent> par2List, Random par3Random, int par4, int par5, int par6, int par7, int par8) {
    final Class<?> var9 = par1StructureVillagePieceWeight.villagePieceClass;
    Object var10 = null;

    if (var9 == VillageStructureComponentWoodHut.class) {
        var10 = VillageStructureComponentWoodHut.func_74908_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
    } else if (var9 == VillageStructureComponentField.class) {
        var10 = VillageStructureComponentField.func_74900_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
    } else if (var9 == VillageStructureComponentField2.class) {
        var10 = VillageStructureComponentField2.func_74900_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
    } else if (var9 == VillageStructureComponentHouse.class) {
        var10 = VillageStructureComponentHouse.func_74921_a(par0ComponentVillageStartPiece, par2List, par3Random, par4, par5, par6, par7, par8);
    }

    return (VillageStructureComponent) var10;
}
项目:4Space-5    文件:VillageStructurePieces.java   
/**
 * attempts to find a next Structure Component to be spawned, private Village function
 */
private static StructureComponent getNextVillageStructureComponent(VillageStructureComponentStartPiece par0ComponentVillageStartPiece, List<StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7) {
    if (par7 > 50) {
        return null;
    } else if (Math.abs(par3 - par0ComponentVillageStartPiece.getBoundingBox().minX) <= 112 && Math.abs(par5 - par0ComponentVillageStartPiece.getBoundingBox().minZ) <= 112) {
        final VillageStructureComponent var8 = VillageStructurePieces.getNextVillageComponent(par0ComponentVillageStartPiece, par1List, par2Random, par3, par4, par5, par6, par7 + 1);

        if (var8 != null) {
            par1List.add(var8);
            par0ComponentVillageStartPiece.field_74932_i.add(var8);
            return var8;
        }

        return null;
    } else {
        return null;
    }
}
项目:4Space-5    文件:VillageStructurePieces.java   
private static StructureComponent getNextComponentVillagePath(VillageStructureComponentStartPiece par0ComponentVillageStartPiece, List<StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7) {
    if (par7 > 3 + par0ComponentVillageStartPiece.terrainType) {
        return null;
    } else if (Math.abs(par3 - par0ComponentVillageStartPiece.getBoundingBox().minX) <= 112 && Math.abs(par5 - par0ComponentVillageStartPiece.getBoundingBox().minZ) <= 112) {
        final StructureBoundingBox var8 = VillageStructureComponentPathGen.func_74933_a(par0ComponentVillageStartPiece, par1List, par2Random, par3, par4, par5, par6);

        if (var8 != null && var8.minY > 10) {
            final VillageStructureComponentPathGen var9 = new VillageStructureComponentPathGen(par0ComponentVillageStartPiece, par7, par2Random, var8, par6);

            par1List.add(var9);
            par0ComponentVillageStartPiece.field_74930_j.add(var9);
            return var9;
        }

        return null;
    } else {
        return null;
    }
}
项目:muon    文件:MuonVillageGrove.java   
public static StructureBoundingBox findPieceBox(StructureVillagePieces.Start start, List<StructureComponent> structureComponents, Random rand, int structureMinX, int structureMinY, int structureMinZ, EnumFacing facing) {
    // for the Grove, find the largest unoccupied space in the village. we will later plant that with trees/saplings
    StructureBoundingBox villagebb = new StructureBoundingBox(start.getBoundingBox());
    MuonHeightMap found = MuonHooks.findTerrain(villagebb, villagebb);
    MuonHeightMap original = null;
    for (StructureComponent piece : structureComponents) {
        villagebb.expandTo(piece.getBoundingBox());
    }
    if (found != null) {
        original = MuonHeightMap.defaultHeights(found.world, found.mapbb);
    }
    // call recursive function to find best gap in bounding box
    StructureBoundingBox position = null;
    position = findPieceGap(villagebb, start, structureComponents, found, original);
    if (position == null) {
        // if we couldn't find a spot within the strict village boundary, look around the edges as well.
        if (found != null) {
            // use actual terraformed area.
            position = findPieceGap(MuonUtils.chunksBoundingBox(found.mapbb), start, structureComponents, found, original);
        } else {
            position = findPieceGap(MuonUtils.chunksBoundingBox(villagebb), start, structureComponents, found, original);
        }
    }
    return position;
}
项目:PopularMMOS-EpicProportions-Mod    文件:StructureVillagePieces.java   
/**
 * Gets the next village component, with the bounding box shifted -1 in the X and Z direction.
 */
protected StructureComponent getNextComponentNN(StructureVillagePieces.Start p_74891_1_, List p_74891_2_, Random p_74891_3_, int p_74891_4_, int p_74891_5_)
{
    switch (this.coordBaseMode)
    {
        case 0:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74891_1_, p_74891_2_, p_74891_3_, this.boundingBox.minX - 1, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ + p_74891_5_, 1, this.getComponentType());
        case 1:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74891_1_, p_74891_2_, p_74891_3_, this.boundingBox.minX + p_74891_5_, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ - 1, 2, this.getComponentType());
        case 2:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74891_1_, p_74891_2_, p_74891_3_, this.boundingBox.minX - 1, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ + p_74891_5_, 1, this.getComponentType());
        case 3:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74891_1_, p_74891_2_, p_74891_3_, this.boundingBox.minX + p_74891_5_, this.boundingBox.minY + p_74891_4_, this.boundingBox.minZ - 1, 2, this.getComponentType());
        default:
            return null;
    }
}
项目:PopularMMOS-EpicProportions-Mod    文件:StructureVillagePieces.java   
/**
 * Gets the next village component, with the bounding box shifted +1 in the X and Z direction.
 */
protected StructureComponent getNextComponentPP(StructureVillagePieces.Start p_74894_1_, List p_74894_2_, Random p_74894_3_, int p_74894_4_, int p_74894_5_)
{
    switch (this.coordBaseMode)
    {
        case 0:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74894_1_, p_74894_2_, p_74894_3_, this.boundingBox.maxX + 1, this.boundingBox.minY + p_74894_4_, this.boundingBox.minZ + p_74894_5_, 3, this.getComponentType());
        case 1:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74894_1_, p_74894_2_, p_74894_3_, this.boundingBox.minX + p_74894_5_, this.boundingBox.minY + p_74894_4_, this.boundingBox.maxZ + 1, 0, this.getComponentType());
        case 2:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74894_1_, p_74894_2_, p_74894_3_, this.boundingBox.maxX + 1, this.boundingBox.minY + p_74894_4_, this.boundingBox.minZ + p_74894_5_, 3, this.getComponentType());
        case 3:
            return StructureVillagePieces.getNextVillageStructureComponent(p_74894_1_, p_74894_2_, p_74894_3_, this.boundingBox.minX + p_74894_5_, this.boundingBox.minY + p_74894_4_, this.boundingBox.maxZ + 1, 0, this.getComponentType());
        default:
            return null;
    }
}
项目:AntiMatterMod    文件:StructureTestStart.java   
public StructureTestStart(World world, Random random, int par3, int par4){
    super(par3,par4);
    // 構造物の構成パーツを決定する
    // 基点はComponentSampleDungeon1
    ComponentTest1 componentTest1 = new ComponentTest1(0, random, (par3 << 4)+2, (par4 << 4)+2);
    this.components.add(componentTest1);

    //次のパーツ
    componentTest1.buildComponent(componentTest1,this.components,random);

    List<StructureComponent> list = componentTest1.structureComponents;
    while (!list.isEmpty()){
        int k = random.nextInt(list.size());
        StructureComponent structureComponent = list.remove(k);
        structureComponent.buildComponent(componentTest1,this.components,random);
    }
    this.updateBoundingBox();
}
项目:AntiMatterMod    文件:ComponentTiamatCenter.java   
@Override
@SuppressWarnings("unchecked")
public void buildComponent(StructureComponent component, List list, Random random) {
    ComponentTiamatCenterLine componentE = new ComponentTiamatCenterLine(random, (this.boundingBox.minX >> 4) + 1, (this.boundingBox.minZ >> 4), ForgeDirection.EAST, 1);
    ((ComponentTiamatCenter) component).structureComponents.add(componentE);
    list.add(componentE);
    ComponentTiamatCenterLine componentW = new ComponentTiamatCenterLine(random, (this.boundingBox.minX >> 4) - 1, (this.boundingBox.minZ >> 4), ForgeDirection.WEST, 1);
    ((ComponentTiamatCenter) component).structureComponents.add(componentW);
    list.add(componentW);
    ComponentTiamatCenterLine componentS = new ComponentTiamatCenterLine(random, (this.boundingBox.minX >> 4), (this.boundingBox.minZ >> 4) + 1, ForgeDirection.SOUTH, 1);
    ((ComponentTiamatCenter) component).structureComponents.add(componentS);
    list.add(componentS);
    ComponentTiamatCenterLine componentN = new ComponentTiamatCenterLine(random, (this.boundingBox.minX >> 4), (this.boundingBox.minZ >> 4) - 1, ForgeDirection.NORTH, 1);
    ((ComponentTiamatCenter) component).structureComponents.add(componentN);
    list.add(componentN);
}
项目:AntiMatterMod    文件:StructureTiamatStart.java   
@SuppressWarnings("unchecked")
StructureTiamatStart(World world, Random random, int chunkX, int chunkZ){
    this.centerChunkX = chunkX;
    this.centerChunkZ = chunkZ;
    ComponentTiamatCenter componentCenter = new ComponentTiamatCenter(random,chunkX,chunkZ);
    this.components.add(componentCenter);

    componentCenter.buildComponent(componentCenter,this.components,random);

    List<StructureComponent> list = componentCenter.structureComponents;
    while (!list.isEmpty()){
        int k = random.nextInt(list.size());
        StructureComponent structureComponent = list.remove(k);
        structureComponent.buildComponent(componentCenter,this.components,random);
    }

    this.updateBoundingBox();
}
项目:Structures    文件:CreationHandler.java   
@SuppressWarnings("rawtypes")
@Override
public Object buildComponent(PieceWeight villagePiece, Start startPiece, List pieces, Random random, int x, int y, int z, int coordBaseMode, int p5) {


  IStructureTemplate template = null;
  if(startPiece.inDesert && !desertTemplates.isEmpty()) {
    template = WeightedTemplate.getTemplate(desertTemplates);      
  } 
  if(template == null) {
    template = WeightedTemplate.getTemplate(templates);
  }
  if(template == null) {
    return null;
  }
  VillageHouse comp = new VillageHouse(template,villagerSpawnLocation, villagerId, x, y, z, coordBaseMode);
  VillageHouse res = canVillageGoDeeper(comp.getBoundingBox()) && StructureComponent.findIntersecting(pieces, comp.getBoundingBox()) == null
      ? comp : null;

  return res;
}
项目:4Space-1.7    文件:StructureVillagePiecesVenus.java   
private static StructureComponent getNextComponentVillagePath(StructureComponentVenusVillageStartPiece par0ComponentVillageStartPiece, List<StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, int par6, int par7) {
    if (par7 > 3 + par0ComponentVillageStartPiece.terrainType) {
        return null;
    } else if (Math.abs(par3 - par0ComponentVillageStartPiece.getBoundingBox().minX) <= 112 && Math.abs(par5 - par0ComponentVillageStartPiece.getBoundingBox().minZ) <= 112) {
        final StructureBoundingBox var8 = StructureComponentVenusVillagePathGen.func_74933_a(par0ComponentVillageStartPiece, par1List, par2Random, par3, par4, par5, par6);

        if (var8 != null && var8.minY > 10) {
            final StructureComponentVenusVillagePathGen var9 = new StructureComponentVenusVillagePathGen(par0ComponentVillageStartPiece, par7, par2Random, var8, par6);

            par1List.add(var9);
            par0ComponentVillageStartPiece.field_74930_j.add(var9);
            return var9;
        }

        return null;
    } else {
        return null;
    }
}
项目:RuneCraftery    文件:StructureStart.java   
public NBTTagCompound func_143021_a(int p_143021_1_, int p_143021_2_) {
   NBTTagCompound var3 = new NBTTagCompound();
   var3.func_74778_a("id", MapGenStructureIO.func_143033_a(this));
   var3.func_74768_a("ChunkX", p_143021_1_);
   var3.func_74768_a("ChunkZ", p_143021_2_);
   var3.func_74782_a("BB", this.field_75074_b.func_143047_a("BB"));
   NBTTagList var4 = new NBTTagList("Children");
   Iterator var5 = this.field_75075_a.iterator();

   while(var5.hasNext()) {
      StructureComponent var6 = (StructureComponent)var5.next();
      var4.func_74742_a(var6.func_143010_b());
   }

   var3.func_74782_a("Children", var4);
   this.func_143022_a(var3);
   return var3;
}
项目:AbyssalCraft    文件:StructureOmotholPieces.java   
/**
 * Gets the next village component, with the bounding box shifted +1 in the X and Z direction.
 */
protected StructureComponent getNextComponentPP(StructureOmotholPieces.Start start, List<StructureComponent> p_74894_2_, Random rand, int p_74894_4_, int p_74894_5_)
{
    if (getCoordBaseMode() != null)
        switch (getCoordBaseMode())
        {
        case NORTH:
            return StructureOmotholPieces.func_176066_d(start, p_74894_2_, rand, boundingBox.maxX + 1, boundingBox.minY + p_74894_4_, boundingBox.minZ + p_74894_5_, EnumFacing.EAST, getComponentType());
        case SOUTH:
            return StructureOmotholPieces.func_176066_d(start, p_74894_2_, rand, boundingBox.maxX + 1, boundingBox.minY + p_74894_4_, boundingBox.minZ + p_74894_5_, EnumFacing.EAST, getComponentType());
        case WEST:
            return StructureOmotholPieces.func_176066_d(start, p_74894_2_, rand, boundingBox.minX + p_74894_5_, boundingBox.minY + p_74894_4_, boundingBox.maxZ + 1, EnumFacing.SOUTH, getComponentType());
        case EAST:
            return StructureOmotholPieces.func_176066_d(start, p_74894_2_, rand, boundingBox.minX + p_74894_5_, boundingBox.minY + p_74894_4_, boundingBox.maxZ + 1, EnumFacing.SOUTH, getComponentType());
        }

    return null;
}
项目:AbyssalCraft    文件:MapGenAbyStronghold.java   
@SuppressWarnings({ "unchecked", "rawtypes" })
public Start(World par1World, Random par2Random, int par3, int par4)
{
    super(par3, par4);
    StructureAbyStrongholdPieces.prepareStructurePieces();
    StructureAbyStrongholdPieces.Stairs2 stairs2 = new StructureAbyStrongholdPieces.Stairs2(0, par2Random, (par3 << 4) + 2, (par4 << 4) + 2);
    components.add(stairs2);
    stairs2.buildComponent(stairs2, components, par2Random);
    List list = stairs2.field_75026_c;

    while (!list.isEmpty())
    {
        int k = par2Random.nextInt(list.size());
        StructureComponent structurecomponent = (StructureComponent)list.remove(k);
        structurecomponent.buildComponent(stairs2, components, par2Random);
    }

    updateBoundingBox();
    markAvailableHeight(par1World, par2Random, 10);
}
项目:AbyssalCraft    文件:StructureAbyStrongholdPieces.java   
private static StructureComponent getNextValidComponent(StructureAbyStrongholdPieces.Stairs2 par0ComponentStrongholdStairs2, List<StructureComponent> par1List, Random par2Random, int par3, int par4, int par5, EnumFacing par6, int par7)
{
    if (par7 > 50)
        return null;
    else if (Math.abs(par3 - par0ComponentStrongholdStairs2.getBoundingBox().minX) <= 112 && Math.abs(par5 - par0ComponentStrongholdStairs2.getBoundingBox().minZ) <= 112)
    {
        StructureAbyStrongholdPieces.Stronghold stronghold = getNextComponent(par0ComponentStrongholdStairs2, par1List, par2Random, par3, par4, par5, par6, par7 + 1);

        if (stronghold != null)
        {
            par1List.add(stronghold);
            par0ComponentStrongholdStairs2.field_75026_c.add(stronghold);
        }

        return stronghold;
    } else
        return null;
}
项目:RuneCraftery    文件:ComponentMineshaftStairs.java   
public void func_74861_a(StructureComponent p_74861_1_, List p_74861_2_, Random p_74861_3_) {
   int var4 = this.func_74877_c();
   switch(this.field_74885_f) {
   case 0:
      StructureMineshaftPieces.func_78814_a(p_74861_1_, p_74861_2_, p_74861_3_, this.field_74887_e.field_78897_a, this.field_74887_e.field_78895_b, this.field_74887_e.field_78892_f + 1, 0, var4);
      break;
   case 1:
      StructureMineshaftPieces.func_78814_a(p_74861_1_, p_74861_2_, p_74861_3_, this.field_74887_e.field_78897_a - 1, this.field_74887_e.field_78895_b, this.field_74887_e.field_78896_c, 1, var4);
      break;
   case 2:
      StructureMineshaftPieces.func_78814_a(p_74861_1_, p_74861_2_, p_74861_3_, this.field_74887_e.field_78897_a, this.field_74887_e.field_78895_b, this.field_74887_e.field_78896_c - 1, 2, var4);
      break;
   case 3:
      StructureMineshaftPieces.func_78814_a(p_74861_1_, p_74861_2_, p_74861_3_, this.field_74887_e.field_78893_d + 1, this.field_74887_e.field_78895_b, this.field_74887_e.field_78896_c, 3, var4);
   }

}
项目:AbyssalCraft    文件:StructureAbyStrongholdPieces.java   
/**
 * Gets the next component in any cardinal direction
 */
protected StructureComponent getNextComponentNormal(StructureAbyStrongholdPieces.Stairs2 par1ComponentStrongholdStairs2, List<StructureComponent> par2List, Random par3Random, int par4, int par5)
{
    switch (getCoordBaseMode())
    {
    case SOUTH:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX + par4, boundingBox.minY + par5, boundingBox.maxZ + 1, getCoordBaseMode(), getComponentType());
    case WEST:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX - 1, boundingBox.minY + par5, boundingBox.minZ + par4, getCoordBaseMode(), getComponentType());
    case NORTH:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX + par4, boundingBox.minY + par5, boundingBox.minZ - 1, getCoordBaseMode(), getComponentType());
    case EAST:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.maxX + 1, boundingBox.minY + par5, boundingBox.minZ + par4, getCoordBaseMode(), getComponentType());
    default:
        return null;
    }
}
项目:AbyssalCraft    文件:StructureAbyStrongholdPieces.java   
/**
 * Gets the next component in the +/- X direction
 */
protected StructureComponent getNextComponentX(StructureAbyStrongholdPieces.Stairs2 par1ComponentStrongholdStairs2, List<StructureComponent> par2List, Random par3Random, int par4, int par5)
{
    switch (getCoordBaseMode())
    {
    case SOUTH:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX - 1, boundingBox.minY + par4, boundingBox.minZ + par5, EnumFacing.WEST, getComponentType());
    case WEST:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX + par5, boundingBox.minY + par4, boundingBox.minZ - 1, EnumFacing.NORTH, getComponentType());
    case NORTH:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX - 1, boundingBox.minY + par4, boundingBox.minZ + par5, EnumFacing.WEST, getComponentType());
    case EAST:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX + par5, boundingBox.minY + par4, boundingBox.minZ - 1, EnumFacing.NORTH, getComponentType());
    default:
        return null;
    }
}
项目:AbyssalCraft    文件:StructureAbyStrongholdPieces.java   
/**
 * Gets the next component in the +/- Z direction
 */
protected StructureComponent getNextComponentZ(StructureAbyStrongholdPieces.Stairs2 par1ComponentStrongholdStairs2, List<StructureComponent> par2List, Random par3Random, int par4, int par5)
{
    switch (getCoordBaseMode())
    {
    case SOUTH:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.maxX + 1, boundingBox.minY + par4, boundingBox.minZ + par5, EnumFacing.EAST, getComponentType());
    case WEST:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX + par5, boundingBox.minY + par4, boundingBox.maxZ + 1, EnumFacing.SOUTH, getComponentType());
    case NORTH:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.maxX + 1, boundingBox.minY + par4, boundingBox.minZ + par5, EnumFacing.EAST, getComponentType());
    case EAST:
        return StructureAbyStrongholdPieces.getNextValidComponent(par1ComponentStrongholdStairs2, par2List, par3Random, boundingBox.minX + par5, boundingBox.minY + par4, boundingBox.maxZ + 1, EnumFacing.SOUTH, getComponentType());
    default:
        return null;
    }
}
项目:AbyssalCraft    文件:StructureAbyStrongholdPieces.java   
public static StructureBoundingBox func_74992_a(List<StructureComponent> par1List, Random par1Random, int par2, int par3, int par4, EnumFacing par6)
{
    StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, 4, par6);
    StructureComponent structurecomponent = StructureComponent.findIntersecting(par1List, structureboundingbox);

    if (structurecomponent == null)
        return null;
    else
    {
        if (structurecomponent.getBoundingBox().minY == structureboundingbox.minY)
            for (int i1 = 3; i1 >= 1; --i1)
            {
                structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, i1 - 1, par6);

                if (!structurecomponent.getBoundingBox().intersectsWith(structureboundingbox))
                    return StructureBoundingBox.getComponentToAddBoundingBox(par2, par3, par4, -1, -1, 0, 5, 5, i1, par6);
            }

        return null;
    }
}
项目:RuneCraftery    文件:StructureVillagePieces.java   
private static StructureComponent func_75080_e(ComponentVillageStartPiece p_75080_0_, List p_75080_1_, Random p_75080_2_, int p_75080_3_, int p_75080_4_, int p_75080_5_, int p_75080_6_, int p_75080_7_) {
   if(p_75080_7_ > 3 + p_75080_0_.field_74928_c) {
      return null;
   } else if(Math.abs(p_75080_3_ - p_75080_0_.func_74874_b().field_78897_a) <= 112 && Math.abs(p_75080_5_ - p_75080_0_.func_74874_b().field_78896_c) <= 112) {
      StructureBoundingBox var8 = ComponentVillagePathGen.func_74933_a(p_75080_0_, p_75080_1_, p_75080_2_, p_75080_3_, p_75080_4_, p_75080_5_, p_75080_6_);
      if(var8 != null && var8.field_78895_b > 10) {
         ComponentVillagePathGen var9 = new ComponentVillagePathGen(p_75080_0_, p_75080_7_, p_75080_2_, var8, p_75080_6_);
         int var10 = (var9.field_74887_e.field_78897_a + var9.field_74887_e.field_78893_d) / 2;
         int var11 = (var9.field_74887_e.field_78896_c + var9.field_74887_e.field_78892_f) / 2;
         int var12 = var9.field_74887_e.field_78893_d - var9.field_74887_e.field_78897_a;
         int var13 = var9.field_74887_e.field_78892_f - var9.field_74887_e.field_78896_c;
         int var14 = var12 > var13?var12:var13;
         if(p_75080_0_.func_74925_d().func_76940_a(var10, var11, var14 / 2 + 4, MapGenVillage.field_75055_e)) {
            p_75080_1_.add(var9);
            p_75080_0_.field_74930_j.add(var9);
            return var9;
         }
      }

      return null;
   } else {
      return null;
   }
}
项目:RuneCraftery    文件:MapGenStructure.java   
protected StructureStart func_143028_c(int p_143028_1_, int p_143028_2_, int p_143028_3_) {
   Iterator var4 = this.field_75053_d.values().iterator();

   while(var4.hasNext()) {
      StructureStart var5 = (StructureStart)var4.next();
      if(var5.func_75069_d() && var5.func_75071_a().func_78885_a(p_143028_1_, p_143028_3_, p_143028_1_, p_143028_3_)) {
         Iterator var6 = var5.func_75073_b().iterator();

         while(var6.hasNext()) {
            StructureComponent var7 = (StructureComponent)var6.next();
            if(var7.func_74874_b().func_78890_b(p_143028_1_, p_143028_2_, p_143028_3_)) {
               return var5;
            }
         }
      }
   }

   return null;
}
项目:RuneCraftery    文件:ComponentMineshaftStairs.java   
public static StructureBoundingBox func_74950_a(List p_74950_0_, Random p_74950_1_, int p_74950_2_, int p_74950_3_, int p_74950_4_, int p_74950_5_) {
   StructureBoundingBox var6 = new StructureBoundingBox(p_74950_2_, p_74950_3_ - 5, p_74950_4_, p_74950_2_, p_74950_3_ + 2, p_74950_4_);
   switch(p_74950_5_) {
   case 0:
      var6.field_78893_d = p_74950_2_ + 2;
      var6.field_78892_f = p_74950_4_ + 8;
      break;
   case 1:
      var6.field_78897_a = p_74950_2_ - 8;
      var6.field_78892_f = p_74950_4_ + 2;
      break;
   case 2:
      var6.field_78893_d = p_74950_2_ + 2;
      var6.field_78896_c = p_74950_4_ - 8;
      break;
   case 3:
      var6.field_78893_d = p_74950_2_ + 8;
      var6.field_78892_f = p_74950_4_ + 2;
   }

   return StructureComponent.func_74883_a(p_74950_0_, var6) != null?null:var6;
}
项目:RuneCraftery    文件:StructureNetherBridgeStart.java   
public StructureNetherBridgeStart(World p_i2040_1_, Random p_i2040_2_, int p_i2040_3_, int p_i2040_4_) {
   super(p_i2040_3_, p_i2040_4_);
   ComponentNetherBridgeStartPiece var5 = new ComponentNetherBridgeStartPiece(p_i2040_2_, (p_i2040_3_ << 4) + 2, (p_i2040_4_ << 4) + 2);
   this.field_75075_a.add(var5);
   var5.func_74861_a(var5, this.field_75075_a, p_i2040_2_);
   ArrayList var6 = var5.field_74967_d;

   while(!var6.isEmpty()) {
      int var7 = p_i2040_2_.nextInt(var6.size());
      StructureComponent var8 = (StructureComponent)var6.remove(var7);
      var8.func_74861_a(var5, this.field_75075_a, p_i2040_2_);
   }

   this.func_75072_c();
   this.func_75070_a(p_i2040_1_, p_i2040_2_, 48, 70);
}
项目:RuneCraftery    文件:ComponentStrongholdCorridor.java   
public static StructureBoundingBox func_74992_a(List p_74992_0_, Random p_74992_1_, int p_74992_2_, int p_74992_3_, int p_74992_4_, int p_74992_5_) {
   boolean var6 = true;
   StructureBoundingBox var7 = StructureBoundingBox.func_78889_a(p_74992_2_, p_74992_3_, p_74992_4_, -1, -1, 0, 5, 5, 4, p_74992_5_);
   StructureComponent var8 = StructureComponent.func_74883_a(p_74992_0_, var7);
   if(var8 == null) {
      return null;
   } else {
      if(var8.func_74874_b().field_78895_b == var7.field_78895_b) {
         for(int var9 = 3; var9 >= 1; --var9) {
            var7 = StructureBoundingBox.func_78889_a(p_74992_2_, p_74992_3_, p_74992_4_, -1, -1, 0, 5, 5, var9 - 1, p_74992_5_);
            if(!var8.func_74874_b().func_78884_a(var7)) {
               return StructureBoundingBox.func_78889_a(p_74992_2_, p_74992_3_, p_74992_4_, -1, -1, 0, 5, 5, var9, p_74992_5_);
            }
         }
      }

      return null;
   }
}
项目:Mods    文件:MannCoBuilding.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces,
        Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    StructureBoundingBox structureboundingbox = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0,
            0, 0, 14, 16, 11, facing);
    return canVillageGoDeeper(structureboundingbox)
            && StructureComponent.findIntersecting(pieces, structureboundingbox) == null
                    ? new MannCoBuilding(startPiece, p5, random, structureboundingbox, facing) : null;
}
项目:4Space-5    文件:StructureComponentVillagePathGen.java   
@SuppressWarnings("rawtypes")
public static StructureBoundingBox func_74933_a(StructureComponentVillageStartPiece par0ComponentVillageStartPiece, List par1List, Random par2Random, int par3, int par4, int par5, int par6)
{
    for (int var7 = 7 * MathHelper.getRandomIntegerInRange(par2Random, 3, 5); var7 >= 7; var7 -= 7)
    {
        final StructureBoundingBox var8 = StructureBoundingBox.getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 3, 3, var7, par6);

        if (StructureComponent.findIntersecting(par1List, var8) == null)
        {
            return var8;
        }
    }

    return null;
}
项目:4Space-5    文件:StructureComponentVillageWell.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void buildComponent(StructureComponent par1StructureComponent, List par2List, Random par3Random)
{
    StructureVillagePiecesMoon.getNextStructureComponentVillagePath((StructureComponentVillageStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.minX - 1, this.boundingBox.maxY - 4, this.boundingBox.minZ + 1, 1, this.getComponentType());
    StructureVillagePiecesMoon.getNextStructureComponentVillagePath((StructureComponentVillageStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.maxX + 1, this.boundingBox.maxY - 4, this.boundingBox.minZ + 1, 3, this.getComponentType());
    StructureVillagePiecesMoon.getNextStructureComponentVillagePath((StructureComponentVillageStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.minX + 1, this.boundingBox.maxY - 4, this.boundingBox.minZ - 1, 2, this.getComponentType());
    StructureVillagePiecesMoon.getNextStructureComponentVillagePath((StructureComponentVillageStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.minX + 1, this.boundingBox.maxY - 4, this.boundingBox.maxZ + 1, 0, this.getComponentType());
}
项目:4Space-5    文件:PitStructureComponentRoom.java   
@Override
public void buildComponent(StructureComponent par1StructureComponent, List par2List, Random par3Random) {
    int var4;

    for (var4 = 0; var4 < 4; ++var4) {
        final int[] var5 = this.getValidOpening(par3Random, var4);

        this.makeCorridor(par2List, par3Random, 1, var5[0], var5[1], var5[2], this.width, 7, var4);
    }
}
项目:4Space-5    文件:VillageStructureComponentWell.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void buildComponent(StructureComponent par1StructureComponent, List par2List, Random par3Random) {
    VillageStructurePieces.getNextStructureComponentVillagePath((VillageStructureComponentStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.minX - 1, this.boundingBox.maxY - 4, this.boundingBox.minZ + 1, 1, this.getComponentType());
    VillageStructurePieces.getNextStructureComponentVillagePath((VillageStructureComponentStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.maxX + 1, this.boundingBox.maxY - 4, this.boundingBox.minZ + 1, 3, this.getComponentType());
    VillageStructurePieces.getNextStructureComponentVillagePath((VillageStructureComponentStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.minX + 1, this.boundingBox.maxY - 4, this.boundingBox.minZ - 1, 2, this.getComponentType());
    VillageStructurePieces.getNextStructureComponentVillagePath((VillageStructureComponentStartPiece) par1StructureComponent, par2List, par3Random, this.boundingBox.minX + 1, this.boundingBox.maxY - 4, this.boundingBox.maxZ + 1, 0, this.getComponentType());
}
项目:4Space-5    文件:VillageStructureComponent.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
protected StructureComponent getNextComponentNN(VillageStructureComponentStartPiece par1ComponentVillageStartPiece, List par2List, Random par3Random, int par4, int par5) {
    switch (this.coordBaseMode) {
    case 0:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX - 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 1, this.getComponentType());
    case 1:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.minZ - 1, 2, this.getComponentType());
    case 2:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX - 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 1, this.getComponentType());
    case 3:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.minZ - 1, 2, this.getComponentType());
    default:
        return null;
    }
}
项目:4Space-5    文件:VillageStructureComponent.java   
@SuppressWarnings({ "rawtypes", "unchecked" })
protected StructureComponent getNextComponentPP(VillageStructureComponentStartPiece par1ComponentVillageStartPiece, List par2List, Random par3Random, int par4, int par5) {
    switch (this.coordBaseMode) {
    case 0:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.maxX + 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 3, this.getComponentType());
    case 1:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.maxZ + 1, 0, this.getComponentType());
    case 2:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.maxX + 1, this.boundingBox.minY + par4, this.boundingBox.minZ + par5, 3, this.getComponentType());
    case 3:
        return VillageStructurePieces.getNextStructureComponent(par1ComponentVillageStartPiece, par2List, par3Random, this.boundingBox.minX + par5, this.boundingBox.minY + par4, this.boundingBox.maxZ + 1, 0, this.getComponentType());
    default:
        return null;
    }
}
项目:4Space-5    文件:VillageStructureComponentPathGen.java   
@SuppressWarnings("rawtypes")
public static StructureBoundingBox func_74933_a(VillageStructureComponentStartPiece par0ComponentVillageStartPiece, List par1List, Random par2Random, int par3, int par4, int par5, int par6) {
    for (int var7 = 7 * MathHelper.getRandomIntegerInRange(par2Random, 3, 5); var7 >= 7; var7 -= 7) {
        final StructureBoundingBox var8 = StructureBoundingBox.getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 3, 3, var7, par6);

        if (StructureComponent.findIntersecting(par1List, var8) == null) {
            return var8;
        }
    }

    return null;
}
项目:ToroQuest    文件:VillageHandlerGuardTower2.java   
public static VillagePieceGuardTower2 createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x,
        int y, int z, EnumFacing facing, int p_175850_7_) {
    BlockPos size = new BlockMapMeasurer(NAME).measure();
    StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(),
            facing);
    return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null
            ? new VillagePieceGuardTower2(start, p_175850_7_, rand, bounds, facing) : null;
}
项目:ToroQuest    文件:VillageHandlerKeep.java   
public static VillagePieceKeep createPiece(StructureVillagePieces.Start start, List<StructureComponent> structures, Random rand, int x, int y,
        int z, EnumFacing facing, int p_175850_7_) {
    BlockPos size = new BlockMapMeasurer(NAME).measure();
    StructureBoundingBox bounds = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, size.getX(), size.getY(), size.getZ(),
            facing);
    return canVillageGoDeeper(bounds) && StructureComponent.findIntersecting(structures, bounds) == null
            ? new VillagePieceKeep(start, p_175850_7_, rand, bounds, facing) : null;
}