Java Code Examples for net.minecraft.world.World.getWorldChunkManager()

The following are Jave code examples for showing how to use getWorldChunkManager() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: BaseClient   File: MapGenVillage.java   Source Code and License Vote up 5 votes
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;
}
 
Example 2
Project: BaseClient   File: MapGenVillage.java   Source Code and License Vote up 5 votes
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;
}