Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Version 0.6.5
- #In order to download or use this software, you must agree to it's license: http://pastebin.com/raw.php?i=JGSLhFdU
- every 1 tick:
- loop players:
- if is raining or thundering in loop-player's world:
- set {_valid.%loop-player%} to true
- set {_loc} to location of loop-player
- set {_horizontalX} to a random integer between (-100 + loop-player's location's x-coordinate) and (100 + loop-player's location's x-coordinate)
- set {_horizontalZ} to a random integer between (-100 + loop-player's location's z-coordinate) and (100 + loop-player's location's z-coordinate)
- set {_vertical} to a random integer between (-20 + loop-player's location's y-coordinate) and (20 + loop-player's location's y-coordinate)
- set {_world} to loop-player's world
- set {_puddleLoc} to loop-player's location
- set the x-coordinate of {_puddleLoc} to {_horizontalX} - 0.5
- set the y-coordinate of {_puddleLoc} to {_vertical} - 0.5
- set the z-coordinate of {_puddleLoc} to {_horizontalZ}
- if block at {_puddleLoc} is air:
- if block below {_puddleLoc} is dirt, stone, grass, cobblestone, bedrock, any sand, any wood, any log, gravel, any stone bricks, coal ore, iron ore, redstone ore, gold ore, emerald ore, diamond ore, or lapis ore:
- loop blocks above block at {_puddleLoc}:
- if loop-block is not air, leaves, water item, or flowing water:
- set {_valid.%loop-player%} to false
- else:
- set {_valid.%loop-player%} to false
- else:
- set {_valid.%loop-player%} to false
- if {_valid.%loop-player%} is true:
- set block at {_puddleLoc} to water
- set data value of block at {_puddleLoc} to 7
- if {puddle.debug} is on:
- message "Puddle added at %{_puddleLoc}%" to loop-player
- add {_puddleLoc} to {puddleLocations.%loop-player's world%::*}
- every 1 second:
- loop worlds:
- if is raining or thundering in loop-world:
- set {_chance} to 1%
- else:
- set {_chance} to 20%
- chance of {_chance}:
- set {_loc} to a random location out of {puddleLocations.%loop-world%::*}
- if {_loc} is set:
- if block at {_loc} is water:
- if data value of block at {_loc} is 7:
- set block at {_loc} to air
- if {puddle.debug} is on:
- broadcast "Puddle removed at %{_loc}%"
- else if {puddle.debug} is on:
- broadcast "Puddle no longer exists at %{_loc}%"
- else if {puddle.debug} is on:
- broadcast "Puddle no longer exists at %{_loc}%"
- wait 1 tick
- remove all {_loc} from {puddleLocations.%loop-world%::*}
- command /puddles [<text>] [<text="%command sender's world%">]:
- trigger:
- if player is an op:
- if argument 1 is "clear":
- if argument 2 is "all":
- loop worlds:
- loop {puddleLocations.%loop-world%::*}:
- set block at loop-value to air
- remove all loop-value from {puddleLocations.%loop-world%::*}
- else:
- loop {puddleLocations.%argument 2%::*}:
- set block at loop-value to air
- remove all loop-value from {puddleLocations.%argument 2%::*}
- else if argument 1 is "list":
- if argument 2 is "all":
- loop worlds:
- loop {puddleLocations.%loop-world%::*}:
- message "%loop-value% in world ""%loop-world%"""
- else:
- loop {puddleLocations.%argument 2 parsed as world%::*}:
- message "%loop-value%" to command sender
- on physics:
- if event-block is water:
- if data value of event-block is 7:
- set {_persist} to false
- set {_loc} to event-block's location
- subtract 0.5 from the z-coordinate of {_loc}
- loop {puddleLocations.%event-world%::*}:
- if "%loop-value%" = "%{_loc}%":
- cancel the event
- set {_persist} to true
- if {puddle.debug} is true:
- if {_persist} is true:
- broadcast "Puddle persisting at %event-location%"
- command /pdebug <boolean>:
- trigger:
- if command sender is an op:
- set {puddle.debug} to argument 1
- command /rain:
- trigger:
- if command sender is an op:
- set weather to rain
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement