Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class NewYorkChunkGenerator extends ChunkGenerator<NewYorkChunkGenerator.Config>
- {
- public NewYorkChunkGenerator(IWorld world, BiomeProvider provider)
- {
- super(world, provider, Config.createDefault());
- }
- @Override
- public void generateSurface(WorldGenRegion region, IChunk chunk)
- {
- BlockState bedrock = Blocks.BEDROCK.getDefaultState();
- BlockState pavement = SetupBlocks.PAVEMENT.get().getDefaultState();
- BlockPos.Mutable pos = new BlockPos.Mutable();
- int x;
- int z;
- for(x = 0; x < 16; x++)
- {
- for(z = 0; z < 16; z++)
- {
- chunk.setBlockState(pos.setPos(x, 0, z), bedrock, false);
- }
- }
- for(x = 0; x < 16; x++)
- {
- for(z = 0; z < 16; z++)
- {
- for(int y = 1; y < getGroundHeight(); y++)
- {
- chunk.setBlockState(pos.setPos(x, y, z), pavement, false);
- }
- }
- }
- }
- @Override
- public void makeBase(IWorld world, IChunk chunk) {}
- @Override
- public int getGroundHeight()
- {
- return 128;
- }
- @Override
- public int func_222529_a(int p_222529_1_, int p_222529_2_, Heightmap.Type heightmapType)
- {
- return 0;
- }
- public static class Config extends GenerationSettings
- {
- public static Config createDefault()
- {
- Config config = new Config();
- config.setDefaultBlock(SetupBlocks.PAVEMENT.get().getDefaultState());
- config.setDefaultFluid(Blocks.WATER.getDefaultState());
- return config;
- }
- }
- }
Add Comment
Please, Sign In to add comment