Disable Infinite Water Sources

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

V3N63R_

Member
Sep 11, 2018
1
0
0
Hello everyone, i need an script that disables the formation of infinite water, i was trying to do it but without success.
Hope if someone can help me, thanks!
(Using Google Translator :emoji_dizzy_face:)
 
According to the Minecraft Wiki:
A water source block will be created from a flowing block that is next to 2 or more other source blocks, and sitting on top of a solid block or another water source block. This is the rule that makes infinite water sources work.

Therefore, we would need to recreate those conditions and cancel event if necessary.

Code used:
code_language.skript:
on bucket empty:
    set {_conditions::1} to true  if block below is solid else false
    set {_conditions::2} to true if block below is stationary water else false
    if {_conditions::*} contains true: #if the block below is a source water block or solid:
        loop blocks in radius 3: #Checks for any water blocks next to, or adjacent 
            if loop-block is stationary water:
                add 1 to {_i}
            if {_i} is more or equal to 2:
                cancel event

However, keep in mind this only prevents water placement from buckets.
 
Status
Not open for further replies.