Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float value = noise.GetPerlinFractal(worldLoc.x, worldLoc.y, worldLoc.z);
- if (y <= waterHeight) {
- for (int i = y; i <= waterHeight; i++) {
- chunk.addBlock(x, i + 1, z, BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.WATER));
- }
- }
- if (value - ((y - 128) * 0.01) >= 0) {
- if ((y > waterHeight && y < waterHeight + 2)) {
- chunk.addBlock(x, y, z, BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.SAND));
- } else {
- chunk.addBlock(x, y, z, BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.GRASS));
- }
- }
- if (y < 105) {
- if ((Math.pow(noise2.GetNoise(worldLoc.x, worldLoc.y, worldLoc.z), 2) + Math.pow(noise3.GetNoise(worldLoc.x, worldLoc.y, worldLoc.z), 2)) < 0.02) {
- if (!(chunk.getBlock(x, y + 1, z) == (BlocksConfig.getInstance().getBlockRegistry().get(BlockIds.WATER)))) {
- chunk.addBlock(x, y, z, null);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment