Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. public void genTerrainBlocks(World worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
  2. {
  3. if(this.isMutation())
  4. {
  5. if (noiseVal > 1.0D && noiseVal < 3.0D)
  6. {
  7. int i = x & 15;
  8. int j = z & 15;
  9.  
  10. for (int k = 250; k >= 150; --k)
  11. {
  12. BlockPos pos = new BlockPos(x, k, z);
  13.  
  14. if (chunkPrimerIn.getBlockState(j, k, i).getMaterial() != Material.AIR)
  15. //This if statement is where I need to check for solid blocks around pos.
  16. {
  17. if (k%2 == 0 && chunkPrimerIn.getBlockState(j, k, i).getBlock() != Blocks.WATER)
  18. {
  19. chunkPrimerIn.setBlockState(j, k, i, WATER);
  20. }
  21. break;
  22. }
  23. }
  24.  
  25. }
  26. }
  27. this.generateBiomeTerrain2(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement