Search in sources :

Example 1 with ChunkBufferPrimer

use of org.spongepowered.common.util.gen.ChunkBufferPrimer in project SpongeCommon by SpongePowered.

the class MixinChunkGeneratorEnd method populate.

@Override
public void populate(World world, MutableBlockVolume buffer, ImmutableBiomeVolume biomes) {
    int x = GenericMath.floor(buffer.getBlockMin().getX() / 16f);
    int z = GenericMath.floor(buffer.getBlockMin().getZ() / 16f);
    ChunkPrimer chunkprimer = new ChunkBufferPrimer(buffer);
    this.rand.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
    this.setBlocksInChunk(x, z, chunkprimer);
}
Also used : ChunkBufferPrimer(org.spongepowered.common.util.gen.ChunkBufferPrimer) ChunkPrimer(net.minecraft.world.chunk.ChunkPrimer)

Example 2 with ChunkBufferPrimer

use of org.spongepowered.common.util.gen.ChunkBufferPrimer in project SpongeCommon by SpongePowered.

the class MixinMapGenBase method populate.

@Override
public void populate(World world, MutableBlockVolume buffer, ImmutableBiomeVolume biomes) {
    Preconditions.checkNotNull(world);
    int x = buffer.getBlockMin().getX() / 16;
    int z = buffer.getBlockMin().getZ() / 16;
    generate((net.minecraft.world.World) world, x, z, new ChunkBufferPrimer(buffer));
}
Also used : ChunkBufferPrimer(org.spongepowered.common.util.gen.ChunkBufferPrimer)

Example 3 with ChunkBufferPrimer

use of org.spongepowered.common.util.gen.ChunkBufferPrimer in project SpongeCommon by SpongePowered.

the class MixinChunkGeneratorHell method populate.

@Override
public void populate(World world, MutableBlockVolume buffer, ImmutableBiomeVolume biomes) {
    int x = GenericMath.floor(buffer.getBlockMin().getX() / 16f);
    int z = GenericMath.floor(buffer.getBlockMin().getZ() / 16f);
    ChunkPrimer chunkprimer = new ChunkBufferPrimer(buffer);
    this.rand.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
    this.prepareHeights(x, z, chunkprimer);
    this.buildSurfaces(x, z, chunkprimer);
}
Also used : ChunkBufferPrimer(org.spongepowered.common.util.gen.ChunkBufferPrimer) ChunkPrimer(net.minecraft.world.chunk.ChunkPrimer)

Example 4 with ChunkBufferPrimer

use of org.spongepowered.common.util.gen.ChunkBufferPrimer in project SpongeCommon by SpongePowered.

the class MixinChunkGeneratorOverworld method populate.

@Override
public void populate(World world, MutableBlockVolume buffer, ImmutableBiomeVolume biomes) {
    int x = GenericMath.floor(buffer.getBlockMin().getX() / 16f);
    int z = GenericMath.floor(buffer.getBlockMin().getZ() / 16f);
    this.rand.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
    this.biomesForGeneration = getBiomesFromGenerator(x, z);
    ChunkPrimer chunkprimer = new ChunkBufferPrimer(buffer);
    this.setBlocksInChunk(x, z, chunkprimer);
    setBedrock(buffer);
}
Also used : ChunkBufferPrimer(org.spongepowered.common.util.gen.ChunkBufferPrimer) ChunkPrimer(net.minecraft.world.chunk.ChunkPrimer)

Aggregations

ChunkBufferPrimer (org.spongepowered.common.util.gen.ChunkBufferPrimer)4 ChunkPrimer (net.minecraft.world.chunk.ChunkPrimer)3