本文整理汇总了Java中net.minecraft.world.World.getWorldChunkManager方法的典型用法代码示例。如果您正苦于以下问题:Java World.getWorldChunkManager方法的具体用法?Java World.getWorldChunkManager怎么用?Java World.getWorldChunkManager使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.World
的用法示例。
在下文中一共展示了World.getWorldChunkManager方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Start
import net.minecraft.world.World; //导入方法依赖的package包/类
public Start(World worldIn, Random rand, int x, int z, int p_i2092_5_)
{
super(x, z);
List<StructureVillagePieces.PieceWeight> list = StructureVillagePieces.getStructureVillageWeightedPieceList(rand, p_i2092_5_);
StructureVillagePieces.Start structurevillagepieces$start = new StructureVillagePieces.Start(worldIn.getWorldChunkManager(), 0, rand, (x << 4) + 2, (z << 4) + 2, list, p_i2092_5_);
this.components.add(structurevillagepieces$start);
structurevillagepieces$start.buildComponent(structurevillagepieces$start, this.components, rand);
List<StructureComponent> list1 = structurevillagepieces$start.field_74930_j;
List<StructureComponent> list2 = structurevillagepieces$start.field_74932_i;
while (!list1.isEmpty() || !list2.isEmpty())
{
if (list1.isEmpty())
{
int i = rand.nextInt(list2.size());
StructureComponent structurecomponent = (StructureComponent)list2.remove(i);
structurecomponent.buildComponent(structurevillagepieces$start, this.components, rand);
}
else
{
int j = rand.nextInt(list1.size());
StructureComponent structurecomponent2 = (StructureComponent)list1.remove(j);
structurecomponent2.buildComponent(structurevillagepieces$start, this.components, rand);
}
}
this.updateBoundingBox();
int k = 0;
for (StructureComponent structurecomponent1 : this.components)
{
if (!(structurecomponent1 instanceof StructureVillagePieces.Road))
{
++k;
}
}
this.hasMoreThanTwoComponents = k > 2;
}