Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @SubscribeEvent
- public void onLavaLakes(PopulateChunkEvent.Post event) {
- IBlockState state = ChiselBlocks.basaltextra.getDefaultState().withProperty(ChiselBlocks.basaltextra.getMetaProp(), 7);
- BlockPos origin = new BlockPos(event.getChunkX() * 16, 0, event.getChunkZ() * 16).add(8, 0, 8);
- MutableBlockPos pos = new MutableBlockPos();
- for (int x = 0; x < 16; x++) {
- for (int z = 0; z < 16; z++) {
- for (int y = 12; y > 0; y--) {
- pos.setPos(origin.getX() + x, origin.getY() + y, origin.getZ() + z);
- if (event.getWorld().getBlockState(pos).getBlock() == Blocks.LAVA) {
- int depth = 0;
- for (int yy = y; yy > 0 && depth < 2; yy--) {
- pos.move(EnumFacing.DOWN);
- if (event.getWorld().getBlockState(pos).getBlock() == Blocks.STONE) {
- event.getWorld().setBlockState(pos, state);
- depth++;
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement