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

项目: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;
}
项目: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;
}
项目: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;
}
项目:Coding    文件:WoodHutCreationHandler.java   
@SuppressWarnings("rawtypes")
    @Override
    public Object buildComponent(PieceWeight villagePiece, Start startPiece, List pieces, Random random, 
            int p1, int p2, int p3, int p4, int p5) {
//              BiomeGenBase biome = 
//                      world.getBiomeGenForCoords(startPiece.getBoundingBox().minX, startPiece.getBoundingBox().minZ);
//      if (biome != ModBiomes.biomeCityPlains)
//          return null;
        return StructureVillagePieces.WoodHut.func_74908_a(startPiece, pieces, random, p1, p2, p3, p4, p5);
    }
项目:Coding    文件:ComponentBakery.java   
public static StructureVillagePieces.Village buildComponent(StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 11, 6, 11, direction);
       if(canVillageGoDeeper(_boundingBox)){ 
        if(StructureComponent.findIntersecting(pieces, _boundingBox) == null){
            return new ComponentBakery(startPiece, type, random, _boundingBox, direction);
        }
       }
    return null;
}
项目:Coding    文件:VillageTavern.java   
public static StructureVillagePieces.Village buildComponent(Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random, int x, int y, int z, int direction, int type) {
       StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0, 14, 10, 8, direction);
       if(canVillageGoDeeper(_boundingBox)){ 
        if(StructureComponent.findIntersecting(pieces, _boundingBox) == null){
            return new VillageTavern(startPiece, type, random, _boundingBox, direction);
        }
       }
    return null;
}
项目:UniversalCoins    文件:ComponentVillageBank.java   
public static ComponentVillageBank buildComponent(Start startPiece, List pieces, Random random, int p1, int p2,
        int p3, EnumFacing facing, int p5) {
    StructureBoundingBox box = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 5, 6, 6,
            facing);
    return canVillageGoDeeper(box) && StructureComponent.findIntersecting(pieces, box) == null
            ? new ComponentVillageBank(startPiece, p5, random, box, facing) : null;
}
项目:UniversalCoins    文件:ComponentVillageShop.java   
public static ComponentVillageShop buildComponent(Start startPiece, List pieces, Random random, int p1, int p2,
        int p3, EnumFacing facing, int p5) {
    StructureBoundingBox box = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 5, 6, 6,
            facing);
    return canVillageGoDeeper(box) && StructureComponent.findIntersecting(pieces, box) == null
            ? new ComponentVillageShop(startPiece, p5, random, box, facing) : null;
}
项目:UniversalCoins    文件:ComponentVillageTrade.java   
public static ComponentVillageTrade buildComponent(Start startPiece, List pieces, Random random, int p1, int p2,
        int p3, EnumFacing facing, int p5) {
    StructureBoundingBox box = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, 0, 0, 4, 4, 4,
            facing);
    return canVillageGoDeeper(box) && StructureComponent.findIntersecting(pieces, box) == null
            ? new ComponentVillageTrade(startPiece, p5, random, box, facing) : null;
}
项目:Restructured    文件:SchematicStructureCreationHandler.java   
@Override
public Village buildComponent(final PieceWeight villagePiece, final Start startPiece,
        final List<StructureComponent> pieces, final Random random, final int x, final int y, final int z,
        final EnumFacing facing, final int type) {

    // This shouldn't happen, but just in case...
    if (!(villagePiece instanceof SchematicPieceWeight))
        return null;

    // Get our next structure
    final SchematicPieceWeight pw = (SchematicPieceWeight) villagePiece;
    final SchematicProperties props = pw.getNextStructure();

    // If we don't get properties we may have exceeded
    // the spawn limit.
    if (props == null)
        return null;

    // Bound it out
    final Dimensions size = props.schematic.getDimensions();
    final StructureBoundingBox _boundingBox = StructureBoundingBox.getComponentToAddBoundingBox(x, y, z, 0, 0, 0,
            size.width, size.height, size.length, facing);

    // Check to see if the region is OK, and if so return back
    // a SchematicStructure surrogate for the schematic.
    if (canVillageGoDeeper(_boundingBox)) {
        if (StructureComponent.findIntersecting(pieces, _boundingBox) == null) {
            ModLog.debug("Village structure [%s] @(%s); mode %d", props.name, _boundingBox, facing);
            final SchematicStructure struct = new SchematicStructure(startPiece, type, random, _boundingBox,
                    facing);
            struct.setProperties(props);
            return struct;
        }
    }
    return null;
}
项目:Structures    文件:CompositeCreationHandler.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) {

  int totalWeight = getTotalWieght(pieceWeights);
  if(totalWeight <= 0) {
    return null;
  }

  for (int i = 0; i < 5; ++i) {

    int randomWeight = random.nextInt(totalWeight);
    Iterator<WeightedCreationHandler> iterator = pieceWeights.iterator();

    while (iterator.hasNext()) {
      WeightedCreationHandler el = iterator.next();
      PieceWeight pieceweight = el.weight;
      randomWeight -= pieceweight.villagePieceWeight;

      if(randomWeight < 0) {
        int notUsed = 0;
        if(!pieceweight.canSpawnMoreVillagePiecesOfType(notUsed)
            || pieceweight == startPiece.structVillagePieceWeight && pieceWeights.size() > 1) {
          break;
        }
        StructureVillagePieces.Village village = (Village) el.handler.buildComponent(pieceweight, startPiece, pieces, random, x, y, z, coordBaseMode, p5);

        if(village != null) {
          ++pieceweight.villagePiecesSpawned;
          startPiece.structVillagePieceWeight = pieceweight;
          if(!pieceweight.canSpawnMoreVillagePieces()) {
            pieceWeights.remove(el);
          }
          return village;
        }
      }
    }
  }
  return null;
}
项目:Mods    文件:MannCoBuilding.java   
public MannCoBuilding(Start startPiece, int p5, Random random, StructureBoundingBox structureboundingbox,
        EnumFacing facing) {
    super(startPiece, p5);
    this.setCoordBaseMode(facing);
    this.boundingBox = structureboundingbox;
}
项目:Dailies    文件:VillageHandlerBailey.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces,
        Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return BaileysShopVillagePiece.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);
}
项目:CrystalMod    文件:CommonProxy.java   
public void preInit(FMLPreInitializationEvent e) {
    modConfigDir = e.getModConfigurationDirectory();
       mainConfig = new Configuration(new File(modConfigDir.getPath() + File.separator + "crystalmod", "crystalmod.cfg"));
       readMainConfig();

       MinecraftForge.EVENT_BUS.register(new Config());
       MinecraftForge.EVENT_BUS.register(new MissingItemHandler());


       ModFluids.registerFluids();
    ModBlocks.init();
    ModItems.init();
    ModCrops.init();
    ModCrafting.preInit();
    ModEntites.init();
       ItemMobEssence.initDefaultMobs();
       ModBats.registerBats();
       ModBats.registerUpgrades();


       CapabilityManager.INSTANCE.register(ExtendedPlayer.class, new ExtendedPlayerProvider.Storage(), ExtendedPlayer.class);
       CapabilityCrystalEnergy.register();

       CrystalModWorldGenerator generator = CrystalModWorldGenerator.instance;
       GameRegistry.registerWorldGenerator(generator, 5);

       MapGenStructureIO.registerStructure(MapGenFusionTemple.Start.class, CrystalMod.resource("fusiontemplestart"));
       MapGenStructureIO.registerStructureComponent(FusionTempleStructure.class, CrystalMod.resource("fusiontemple"));
       MapGenStructureIO.registerStructure(MapGenCrystexiumSpike.Start.class, CrystalMod.resource("crystexiumspikestart"));
       MapGenStructureIO.registerStructureComponent(CrystexiumSpikeStructure.class, CrystalMod.resource("crystexiumspike"));
       MapGenStructureIO.registerStructureComponent(VillageCornField.class, CrystalMod.resource("villagecornfield"));



       MinecraftForge.EVENT_BUS.register(generator);

       MinecraftForge.EVENT_BUS.register(DropCapture.instance);

       MinecraftForge.EVENT_BUS.register(new DisguiseHandler());

       PlayerCubeChunkLoaderManager.init();
       ForgeChunkManager.setForcedChunkLoadingCallback(CrystalMod.instance, new WorksiteChunkLoader());

       ModIntegration.register();
       ModIntegration.preInit();
}
项目:ToroQuest    文件:VillageHandlerGuardTower2.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3,
        EnumFacing facing, int p5) {
    return VillagePieceGuardTower2.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerGuardTower2.java   
public VillagePieceGuardTower2(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:ToroQuest    文件:VillageHandlerBarracks.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return VillagePieceBarracks.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerBarracks.java   
public static VillagePieceBarracks 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 VillagePieceBarracks(start, p_175850_7_, rand, bounds, facing) : null;
}
项目:ToroQuest    文件:VillageHandlerBarracks.java   
public VillagePieceBarracks(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:ToroQuest    文件:VillageHandlerCabin.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return VillagePieceCabin.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerCabin.java   
public VillagePieceCabin(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:ToroQuest    文件:VillageHandlerGuardTower.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return VillagePieceGuardTower.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerGuardTower.java   
public static VillagePieceGuardTower 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 VillagePieceGuardTower(start, p_175850_7_, rand, bounds, facing) : null;
}
项目:ToroQuest    文件:VillageHandlerGuardTower.java   
public VillagePieceGuardTower(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:ToroQuest    文件:VillageHandlerShop.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return VillagePieceShop.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerShop.java   
public static VillagePieceShop 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 VillagePieceShop(start, p_175850_7_, rand, bounds, facing) : null;
}
项目:ToroQuest    文件:VillageHandlerShop.java   
public VillagePieceShop(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:ToroQuest    文件:VillageHandlerTrophy.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return VillagePieceTrophy.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerTrophy.java   
public static VillagePieceTrophy 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 VillagePieceTrophy(start, p_175850_7_, rand, bounds, facing) : null;
}
项目:ToroQuest    文件:VillageHandlerTrophy.java   
public VillagePieceTrophy(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:ToroQuest    文件:VillageHandlerKeep.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3,
        EnumFacing facing, int p5) {
    return VillagePieceKeep.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);

}
项目:ToroQuest    文件:VillageHandlerKeep.java   
public VillagePieceKeep(Start start, int type, Random rand, StructureBoundingBox bounds, EnumFacing facing) {
    super(NAME, start, type, rand, bounds, facing);
}
项目:Toms-Mod    文件:VillageHouseScientist.java   
public VillageHouseScientist(Start villagePiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, EnumFacing facing) {
    super(villagePiece, par2);
    this.setCoordBaseMode(facing);
    this.boundingBox = par4StructureBoundingBox;
}
项目:Toms-Mod    文件:VillageHouseScientist.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 box = StructureBoundingBox.getComponentToAddBoundingBox(p1, p2, p3, 0, -32 + 9, 0, 13, 11, 13, facing);
    return !Config.genScientistHouse || !(box != null && box.minY > 16) || (StructureComponent.findIntersecting(pieces, box) != null) ? null : new VillageHouseScientist(startPiece, p5, random, box, facing);
}
项目:SimpleCorn    文件:CornWorldGen.java   
@Override
public Village buildComponent(PieceWeight villagePiece, Start startPiece,List pieces, Random random, int x, int y, int z,EnumFacing facing, int p5) {
    return ComponentCornField.createPiece(startPiece, pieces, random, x, y, z, facing, p5);
}
项目:Coding    文件:CatapultTowerCreationHandler.java   
@SuppressWarnings("rawtypes")
@Override
public Object buildComponent(PieceWeight villagePiece, Start startPiece, List pieces, Random random, 
        int p1, int p2, int p3, int p4, int p5) {
    return CatapultTower.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5);
}
项目:Coding    文件:GuardTowerCreationHandler.java   
@SuppressWarnings("rawtypes")
@Override
public Object buildComponent(PieceWeight villagePiece, Start startPiece, List pieces, Random random, 
        int p1, int p2, int p3, int p4, int p5) {
    return VillageGuardTower.buildComponent(startPiece, pieces, random, p1, p2, p3, p4, p5);
}
项目:Coding    文件:House3CreationHandler.java   
@SuppressWarnings("rawtypes")
@Override
public Object buildComponent(PieceWeight villagePiece, Start startPiece, List pieces, Random random, 
        int p1, int p2, int p3, int p4, int p5) {
    return StructureVillagePieces.House3.func_74921_a(startPiece, pieces, random, p1, p2, p3, p4, p5);
}
项目:Coding    文件:BakeryHandler.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) {
       return ComponentBakery.buildComponent(startPiece, pieces, random, x, y, z, coordBaseMode, p5);
   }