Advertisement
Guest User

Untitled

a guest
Jul 10th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. @SubscribeEvent
  2. public void onLavaLakes(PopulateChunkEvent.Post event) {
  3. IBlockState state = ChiselBlocks.basaltextra.getDefaultState().withProperty(ChiselBlocks.basaltextra.getMetaProp(), 7);
  4. BlockPos origin = new BlockPos(event.getChunkX() * 16, 0, event.getChunkZ() * 16).add(8, 0, 8);
  5. MutableBlockPos pos = new MutableBlockPos();
  6. for (int x = 0; x < 16; x++) {
  7. for (int z = 0; z < 16; z++) {
  8. for (int y = 12; y > 0; y--) {
  9. pos.setPos(origin.getX() + x, origin.getY() + y, origin.getZ() + z);
  10. if (event.getWorld().getBlockState(pos).getBlock() == Blocks.LAVA) {
  11. int depth = 0;
  12. for (int yy = y; yy > 0 && depth < 2; yy--) {
  13. pos.move(EnumFacing.DOWN);
  14. if (event.getWorld().getBlockState(pos).getBlock() == Blocks.STONE) {
  15. event.getWorld().setBlockState(pos, state);
  16. depth++;
  17. }
  18. }
  19. }
  20. }
  21. }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement