#help with 3x3 mining pickaxe

1 messages · Page 1 of 1 (latest)

wet marsh
#

could anyone help me fix or add a feature so the blocks in the 3x3 area cant be bedrock or like any other block you cant break normally bc rn i can break every block

on mine:
if {item::drill} is set:
if player's tool is {item::drill}:
set {_1} to location of event-block
set {_2} to location of event-block

        if player's pitch is between -50 and 50:
            add 1 to y-coordinate of {_1}
            subtract 1 from y-coordinate of {_2}

            if player's horizontal facing is west or east:
                add 1 to z-coordinate of {_1}
                subtract 1 from z-coordinate of {_2}
                loop blocks within {_1} to {_2}:
                    break loop-block naturally using player's tool

            else if player's horizontal facing is north or south:
                add 1 to x-coordinate of {_1}
                subtract 1 from x-coordinate of {_2}
                loop blocks within {_1} to {_2}:
                    break loop-block naturally using player's tool

        else:
            add 1 to x-coordinate of {_1}
            add 1 to z-coordinate of {_1}
            subtract 1 from x-coordinate of {_2}
            subtract 1 from z-coordinate of {_2}
            loop blocks within {_1} to {_2}:
                break loop-block naturally using player's tool
keen oyster
#

check if the player's tool is the preferred tool of the block

wet marsh
#

how do i do that

keen oyster
wet marsh
#

any addons needed

keen oyster
#

it tells you on the right

wet marsh
#

i tried it

#

it didnt work

#

wait lemme make a vid

keen oyster
#

then you did it incorrectly

wet marsh
#

where do i put it in the skript

#

at the top?

keen oyster
#

you should be able to figure that out, you made this code

wet marsh
#

okay thanks for the help imma try a bit

#

well didnt figure it out where to put it but could i just put like a if block bedrock cancel event or something

keen oyster
#

you shouldn't hardcode everything

#

and that's gonna give you the same issue if you put it in the wrong place

wet marsh
#

tell me please where to put it which line

keen oyster
#

also why do you loop {_1} and {_2} every time? you only need it once

wet marsh
#

idk ig

#

well idk i hard coded it for now ill try to fix it later

ripe onyx
#

do you mean 3x3 or 3x3x3

#

cause if its a cube, just loop blocks in radius 1.75

#

which is just greater than sqrt3, so should reach all the blocks

high idol
#

you could also get the two corners by using offsets then loop the blocks within the two locations

wet marsh