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);
}
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));
}
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);
}
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);
}
Aggregations