Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 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. if (chunkPrimerIn.getBlockState(j, k, i).getMaterial() != Material.AIR) //This is where I need to check for solid blocks around pos.
  14. {
  15. if (k%2 == 0 && chunkPrimerIn.getBlockState(j, k, i).getBlock() != Blocks.WATER)
  16. {
  17. chunkPrimerIn.setBlockState(j, k, i, WATER);
  18. }
  19. break;
  20. }
  21. }
  22.  
  23. }
  24. }
  25. this.generateBiomeTerrain2(worldIn, rand, chunkPrimerIn, x, z, noiseVal);
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement