If a certain block is _____ block

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

QmanRocks

New Member
Aug 2, 2021
7
0
1
16
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.
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: <
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.
 
Status
Not open for further replies.