So, I'm working on a skript where ores only spawn in caves aka if they're in a 2 block radius of an air block. I seem to hit a bump in my process. When I load it in, it says there are no errors, but for some reason, most ores still get replaced, even if they are within the air radius.
Code:
Code:
code_language.skript:
on chunk generate:
set {_ChunkCorner1} to location at block at 15, 256, 15 in event-chunk
set {_ChunkCorner2} to location at block at 0, 0, 0 in event-chunk
loop all blocks within {_ChunkCorner1} to {_ChunkCorner2}:
if loop-block-1 is a diamond ore:
loop all blocks in radius 2 of loop-block-1:
loop-block-2 is not air:
set loop-block-1 to stone
else if loop-block-1 is a gold ore:
loop all blocks in radius 2 of loop-block-1:
loop-block-2 is not air:
set loop-block-1 to stone
else if loop-block-1 is a redstone ore:
loop all blocks in radius 2 of loop-block-1:
loop-block-2 is not air:
set loop-block-1 to stone