本文整理汇总了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));
}
}
示例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));
}
}
示例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;
}
示例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());
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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);
}
示例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));
}
示例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);
}
示例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);
}
示例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));
}