Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Version 1.0.1
- #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:
- if biome at {_puddleLoc} is Desert, Desert Mountains, Desert Hills, Savanna, Savanna Mountains, Savanna Plateau, Savanna Plateau Mountains, Mesa, Mesa Bryce, Mesa Plateau, Mesa Plateau Mountains, Mesa Plateau forest, Mesa Plateau forest mountains, Cold Taiga, Cold Taiga Mountains, Cold Taiga Hills, Ice Plains, Ice Plains Spikes, Ice Mountains, Cold Beach, Frozen River, or hell:
- set {_valid.%loop-player%} to false
- else if biome at {_puddleLoc} is Extreme Hills, Extreme Hills Mountains, Extreme Hills Plus, or Extreme Hills Plus Mountains:
- if {_vertical} >= 93:
- set {_valid.%loop-player%} to false
- 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:
- set {_chance} to 20%
- if is raining in loop-world:
- if time in loop-world is between 20:00 and 8:00:
- set {_chance} to {_chance} * 0.25
- else if time in loop-world is between 11:00 and 16:00:
- set {_chance} to {_chance} * 0.75
- else:
- set {_chance} to {_chance} * 0.50
- else if is thundering in loop-world:
- if time in loop-world is between 20:00 and 8:00:
- set {_chance} to {_chance} * 0.05
- if time in loop-world is between 11:00 and 16:00:
- set {_chance} to {_chance} * 0.2
- else:
- set {_chance} to {_chance} * 0.1
- else if is sunny in loop-world:
- if time in loop-world is between 20:00 and 8:00:
- set {_chance} to {_chance} * 0.9
- else if time in loop-world is between 11:00 and 16:00:
- set {_chance} to {_chance} * 1.2
- else:
- set {_chance} to {_chance} * 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%">]:
- aliases: /puddle
- 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%::*}
- message "<light red>Cleared all puddles in all worlds..."
- else if argument 2 is not "all":
- loop {puddleLocations.%argument 2%::*}:
- set block at loop-value to air
- remove all loop-value from {puddleLocations.%argument 2%::*}
- message "<light red>Cleared all puddles in world ""%argument 2%"""
- else if argument 1 is "list":
- if argument 2 is "all":
- set {_amt} to 0
- loop worlds:
- loop {puddleLocations.%loop-world%::*}:
- add 1 to {_amt}
- message "(%{_amt}%). %loop-value% in world ""%loop-world%"""
- else:
- set {_amt} to 0
- loop {puddleLocations.%argument 2%::*}:
- add 1 to {_amt}
- message "(%{_amt}%). %loop-value%" to command sender
- message "<light green>Listed all puddles in world ""%argument 2%"""
- else:
- message "<light red>/puddles <clear|list> [<world|all>]"
- else:
- message "<red>You do not have permission to do this"
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement