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!


    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.

Block states/data values of water

Discussion in 'Skript' started by J3zus, Sep 29, 2022.

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

    J3zus Member

    Sep 29, 2022
    Likes Received:
    Hi all,
    I made a mobgen skript that works fine until you put the gen under the water.
    Normally the gen requires players to be sneaking to remove the gen so they dont remove it accidentally, however when the gen is under the water it allows them to break it as for some reason in "On block break" events, it counts the water as the target block/event-block rather than the block actually being broken.

    I have fixed this by doing the following code:
    on block break:
    if target block is flowing water or stationary water:

    This fixes the issue in most cases, but it doesnt fix it if you break the block through a waterfall.
    So i was hoping there was a "if target block is falling water", however this is not a thing. I have also tried doing water[falling=true] or flowing water[falling=true] but all do not exist.

    How do i detect falling water so i can stop people from breaking the gens through it and just getting a normal block back?
    Or, is there a way to just say if the target block is any kind of water?

    (This works and player is not able to just break the block without removing the water)
    (This does not work and player is able to break the block)
  2. Pierrelasse

    Pierrelasse Active Member

    Apr 20, 2022
    Likes Received:
    Code (Text):
    2. # Levels are 0 to 15. 15 is max
    3. if blockhere is water[level=15]:
Thread Status:
Not open for further replies.

Share This Page