mining 3x3, 3x4 and 3x5

  • 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.

Mattllama987

Active Member
Aug 5, 2018
225
7
18
24
Hello, im making a custom enchantment that will mine a 3x3, 3x4 and 3x5 area. The 3x3 works fine, but the 3x4 is acting a little goofy. When i mine, it will break the block below the event-block, but it wont mine the top blocks next to the event block. Ill post a gif on what it does.
GIF:
https://gyazo.com/9ea4f8ecaff27d1a94b8d83fa51105e9

Skript version:
2.4.1

Server Version:
1.14.4 Paper Spigot

Code:
Code:
on mine:
    set {_lore::*} to lore of player's tool
    loop {_lore::*}:
        if "%loop-value%" contains "&bDrill 1":
            set {_location} to location of event-block
            remove 1 from y coord of {_location}
            loop all blocks around {_location} in radius 1.8:
                if loop-block is not bedrock:
                    give player loop-blocks
                    set loop-block to air
        else if "%loop-value%" contains "&bDrill 2":
            set {_location} to location of event-block
            remove 2 from y coord of {_location}
            loop all blocks around {_location} in radius 1.8:
                if loop-block is not bedrock:
                    give player loop-blocks
                    set loop-block to air

Thanks!
~Matt
 
Have you tried removin just one value of the Y-loc in the line 13? also, if this is for large server with bunch of people, you must replace the loop in line 3 with checking only 1 lore line, in order to avoid lag issues, xxoo!
 
I will fix the loop in line 3 that you said. But i messed around with a few numbers to get it right yeah. But i cant seem to get it just right lol.
 
Check the player's pitch, to determine if they're looking at the x-axis or z-axis.
loop from top left block thru the bottom right block from the player's perspective
naturally, break loop-block
 
Sorry i haven't replied sooner. But ive tried a few different things, and its just not working how it should. Could you show me a example on how you would do it so i can get it to work? :emoji_slight_smile:
[doublepost=1578588166,1578256166][/doublepost]Bump
[doublepost=1578849909][/doublepost]Bump
 
Status
Not open for further replies.