1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Issue Checking Loop Blocks

Discussion in 'Skript' started by Selvati, Jan 27, 2020.

Thread Status:
Not open for further replies.
  1. Selvati

    Selvati Active Member

    Joined:
    Jun 26, 2017
    Messages:
    190
    Likes Received:
    9
    It's been a while since I've done anything with Skript and I've had this 3x3 mining skript that I made a post about a long time ago, basically in 1.12 it works flawlessly but after recently updating to 1.14.4 Paper Spigot and correctly updating all of my addons to the latest versions (Bensku Skript, Skellet, SkNBeeT, SkQuery, SkRayfall, Tablisknu, SkUtilities, & Skript Mirror) it completely ignores the if statement that allows for whitelisting certain blocks from being mined. Keep in mind there are no errors in console or while executing the events, and theoretically the code is solid, but after being away for so long I may be behind on syntaxing and such, any help is appreciated.


    Code (Text):
    1. # 3x3 Mining
    2. on mine:
    3.     player's held item is any pickaxe:
    4.         set {_1} to location of event-block
    5.         set {_2} to location of event-block
    6.         if player's pitch is between -50 and 50:
    7.             add 1 to y-coord of {_1}
    8.             subtract 1 from y-coord of {_2}
    9.             if player's horizontal facing is west or east:
    10.                 add 1 to z-coord of {_1}
    11.                 subtract 1 from z-coord of {_2}
    12.                 loop blocks within {_1} to {_2}:
    13.                     if loop-block is not bedrock, or lava, or water, or coal ore, or iron ore, or gold ore, or lapis ore, or redstone ore, or diamond ore, or emerald ore, or quartz ore, or obsidian, or spawner:
    14.                         break loop-block using player's tool
    15.             else if player's horizontal facing is north or south:
    16.                 add 1 to x-coord of {_1}
    17.                 subtract 1 from x-coord of {_2}
    18.                 loop blocks within {_1} to {_2}:
    19.                     if loop-block is not bedrock, or lava, or water, or coal ore, or iron ore, or gold ore, or lapis ore, or redstone ore, or diamond ore, or emerald ore, or quartz ore, or obsidian, or spawner:
    20.                         break loop-block using player's tool
    21.         else:
    22.             add 1 to x-coord of {_1}
    23.             add 1 to z-coord of {_1}
    24.             subtract 1 from x-coord of {_2}
    25.             subtract 1 from z-coord of {_2}
    26.             loop blocks within {_1} to {_2}:
    27.                 if loop-block is not bedrock, or lava, or water, or coal ore, or iron ore, or gold ore, or lapis ore, or redstone ore, or diamond ore, or emerald ore, or quartz ore, or obsidian, or spawner:
    28.                     break loop-block using player's tool
     
Thread Status:
Not open for further replies.

Share This Page

Loading...