I'm coding an excavator that mines a 3x3x20 space when used, and I need to make a blacklist of blocks it shouldn't break when excavating (so the player can mine them). Here's the code so far.
I get an error right where the < symbol is, because I couldn't compare the vanilla name of a block to an item. I'm not sure how to solve this, and I've looked around for other threads like this but couldn't find any.
Code:
on rightclick with structure void on stone:
if player's y coordinate is less than 40:
if player's level is greater than 3:
remove 3 from player's level
set {_x} to the x coordinate of clicked block
set {_y} to the y coordinate of clicked block
set {_z} to the z coordinate of clicked block
if player's facing is east:
#begin excavation:
set {_z} to {_z} - 1
set {_y} to {_y} + 1
loop 20 times:
loop 3 times:
if vanilla name of block at ({_x}, {_y}, {_z}) is not diamond ore or gold ore: <