当前位置: 首页>>代码示例>>Java>>正文


Java StructureVillagePieces.PieceWeight方法代码示例

本文整理汇总了Java中net.minecraft.world.gen.structure.StructureVillagePieces.PieceWeight方法的典型用法代码示例。如果您正苦于以下问题:Java StructureVillagePieces.PieceWeight方法的具体用法?Java StructureVillagePieces.PieceWeight怎么用?Java StructureVillagePieces.PieceWeight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.gen.structure.StructureVillagePieces的用法示例。


在下文中一共展示了StructureVillagePieces.PieceWeight方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addExtraVillageComponents

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
public static void addExtraVillageComponents(List<PieceWeight> list, Random random, int i)
{
    List<StructureVillagePieces.PieceWeight> parts = list;
    for (IVillageCreationHandler handler : instance().villageCreationHandlers.values())
    {
        parts.add(handler.getVillagePieceWeight(random, i));
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:9,代码来源:VillagerRegistry.java

示例2: addExtraVillageComponents

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
public static void addExtraVillageComponents(@SuppressWarnings("rawtypes") ArrayList components, Random random, int i)
{
    @SuppressWarnings("unchecked")
    List<StructureVillagePieces.PieceWeight> parts = components;
    for (IVillageCreationHandler handler : instance().villageCreationHandlers.values())
    {
        parts.add(handler.getVillagePieceWeight(random, i));
    }
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:10,代码来源:VillagerRegistry.java

示例3: getTotalWieght

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
private int getTotalWieght(List<WeightedCreationHandler> handlers) {
  boolean result = false;
  int totalWeight = 0;
  StructureVillagePieces.PieceWeight pieceweight;

  for (Iterator<WeightedCreationHandler> iterator = handlers.iterator(); iterator.hasNext(); totalWeight += pieceweight.villagePieceWeight) {
    pieceweight = iterator.next().weight;

    if(pieceweight.villagePiecesLimit > 0 && pieceweight.villagePiecesSpawned < pieceweight.villagePiecesLimit) {
      result = true;
    }
  }

  return result ? totalWeight : -1;
}
 
开发者ID:SleepyTrousers,项目名称:Structures,代码行数:16,代码来源:CompositeCreationHandler.java

示例4: addAllPieces

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
public static final void addAllPieces(ArrayList list)
{
	Iterator<StructureVillagePieces.PieceWeight> iterator = pieces.iterator();
	
	while (iterator.hasNext())
	{
		list.add(iterator.next());
	}
}
 
开发者ID:Niadel,项目名称:N-API,代码行数:10,代码来源:VillagePieceRegistry.java

示例5: getVillagePieceWeight

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int i)
{
	return new StructureVillagePieces.PieceWeight(Cave.class, 3, 1);
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:6,代码来源:VillagerStructures.java

示例6: buildComponent

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List<StructureComponent> pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5)
{
	return Cave.createPiece(startPiece, pieces, random, p1, p2, p3, facing, p5);
}
 
开发者ID:DarkMorford,项目名称:BetterThanWeagles,代码行数:6,代码来源:VillagerStructures.java

示例7: getVillagePieceWeight

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public PieceWeight getVillagePieceWeight(Random random, int i) {
	return new StructureVillagePieces.PieceWeight(MannCoBuilding.class, 15, 1);
}
 
开发者ID:rafradek,项目名称:Mods,代码行数:5,代码来源:MannCoBuilding.java

示例8: getVillageComponent

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
public static Village getVillageComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List<StructureComponent> pieces, Random random,
                                          int p1, int p2, int p3, EnumFacing facing, int p5)
{
    return instance().villageCreationHandlers.get(villagePiece.villagePieceClass).buildComponent(villagePiece, startPiece, pieces, random, p1, p2, p3, facing, p5);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:6,代码来源:VillagerRegistry.java

示例9: getVillageComponent

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
public static Object getVillageComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, @SuppressWarnings("rawtypes") List pieces, Random random,
        int p1, int p2, int p3, int p4, int p5)
{
    return instance().villageCreationHandlers.get(villagePiece.field_75090_a).buildComponent(villagePiece, startPiece, pieces, random, p1, p2, p3, p4, p5);
}
 
开发者ID:SchrodingersSpy,项目名称:TRHS_Club_Mod_2016,代码行数:6,代码来源:VillagerRegistry.java

示例10: getVillagePieceWeight

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int size) {
    return new StructureVillagePieces.PieceWeight(ComponentVillageUndertaker.class, 3, MathHelper.getInt(random, 0, 1));
}
 
开发者ID:NightKosh,项目名称:Gravestone-mod-Extended,代码行数:5,代码来源:VillageHandlerGSUndertaker.java

示例11: buildComponent

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return ComponentVillageUndertaker.buildComponent(startPiece, pieces, random, p1, p2, p3, facing, p5);
}
 
开发者ID:NightKosh,项目名称:Gravestone-mod-Extended,代码行数:5,代码来源:VillageHandlerGSUndertaker.java

示例12: getVillagePieceWeight

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public StructureVillagePieces.PieceWeight getVillagePieceWeight(Random random, int size) {
    return new StructureVillagePieces.PieceWeight(ComponentVillageMemorial.class, 3, MathHelper.getInt(random, 0, 1));
}
 
开发者ID:NightKosh,项目名称:Gravestone-mod-Extended,代码行数:5,代码来源:VillageHandlerMemorial.java

示例13: buildComponent

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public StructureVillagePieces.Village buildComponent(StructureVillagePieces.PieceWeight villagePiece, StructureVillagePieces.Start startPiece, List pieces, Random random, int p1, int p2, int p3, EnumFacing facing, int p5) {
    return ComponentVillageMemorial.buildComponent(startPiece, pieces, random, p1, p2, p3, facing, p5);
}
 
开发者ID:NightKosh,项目名称:Gravestone-mod-Extended,代码行数:5,代码来源:VillageHandlerMemorial.java

示例14: getVillagePieceWeight

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public PieceWeight getVillagePieceWeight(Random random, int i) {
	return new StructureVillagePieces.PieceWeight(VillageHouseScientist.class, Config.scientistHouseWeight, i);
}
 
开发者ID:tom5454,项目名称:Toms-Mod,代码行数:5,代码来源:VillageHouseScientist.java

示例15: getVillagePieceWeight

import net.minecraft.world.gen.structure.StructureVillagePieces; //导入方法依赖的package包/类
@Override
public PieceWeight getVillagePieceWeight(Random random, int i) {
       return  new StructureVillagePieces.PieceWeight(ComponentCornField.class, Config.generationWeight, MathHelper.getInt(random, 2 + i, 4 + i * 2));
}
 
开发者ID:cleverpanda,项目名称:SimpleCorn,代码行数:5,代码来源:CornWorldGen.java


注:本文中的net.minecraft.world.gen.structure.StructureVillagePieces.PieceWeight方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。