Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on block land:
- {listoffallingblock::%entity%} is set:
- clear {listoffallingblock::%entity%}
- cancel event
- command /checkregen:
- trigger:
- message "Soft blocks to regen: %size of {fallingblocks.soft.location::*}%"
- message "Hard blocks to regen: %size of {fallingblocks.hard.location::*}%"
- every tick:
- set {_count} to 0
- if {fallingblocks.activate} is set:
- if size of {fallingblocks.hard.time::*} is greater than 0:
- if {fallingblocks.catch} is not set:
- loop 30 times:
- set {_loopvalue} to random element out of {fallingblocks.hard.location::*}
- if {fallingblocks.hard.time::%{_loopvalue}%} was more than 8 seconds ago:
- set {_count} to {_count} + 1
- set block at {_loopvalue} to {fallingblocks.hard.blocktype::%{_loopvalue}%}
- set {_id} to id of {fallingblocks.hard.blocktype::%{_loopvalue}%}
- clear {fallingblocks.hard.location::%{_loopvalue}%}
- clear {fallingblocks.hard.blocktype::%{_loopvalue}%}
- clear {fallingblocks.hard.time::%{_loopvalue}%}
- if size of {fallingblocks.hard.location::*} is less than 200:
- if size of {fallingblocks.hard.location::*} is less than 1:
- clear {fallingblocks.activate}
- stop
- else if size of {fallingblocks.hard.location::*} is less than 400:
- if {_count} is greater than 1:
- stop
- else if size of {fallingblocks.hard.location::*} is less than 1000:
- if {_count} is greater than 4:
- stop
- else if size of {fallingblocks.hard.location::*} is less than 2000:
- if {_count} is greater than 7:
- stop
- else:
- if {_count} is greater than 12:
- stop
- if size of {fallingblocks.hard.time::*} is 0:
- if size of {fallingblocks.soft.location::*} is greater than 0:
- if {fallingblocks.catch} is not set:
- set {_loopvalue} to random element out of {fallingblocks.soft.location::*}
- if {fallingblocks.soft.time::%{_loopvalue}%} was more than 8 seconds ago:
- set {_count} to {_count} + 1
- set block at {_loopvalue} to {fallingblocks.soft.blocktype::%{_loopvalue}%}
- if "%{fallingblocks.soft.blocktype::%{_loopvalue}%}%" contains "sign":
- wait 1 tick
- if {fallingblocks.soft.sign.1::%{_loopvalue}%} is set:
- set line 1 of block at {_loopvalue} to "%{fallingblocks.soft.sign.1::%{_loopvalue}%}%"
- set line 2 of block at {_loopvalue} to "%{fallingblocks.soft.sign.2::%{_loopvalue}%}%"
- set line 3 of block at {_loopvalue} to "%{fallingblocks.soft.sign.3::%{_loopvalue}%}%"
- set line 4 of block at {_loopvalue} to "%{fallingblocks.soft.sign.4::%{_loopvalue}%}%"
- clear {fallingblocks.soft.sign.1::%{_loopvalue}%}
- clear {fallingblocks.soft.sign.2::%{_loopvalue}%}
- clear {fallingblocks.soft.sign.3::%{_loopvalue}%}
- clear {fallingblocks.soft.sign.4::%{_loopvalue}%}
- clear {fallingblocks.soft.location::%{_loopvalue}%}
- clear {fallingblocks.soft.blocktype::%{_loopvalue}%}
- clear {fallingblocks.soft.time::%{_loopvalue}%}
- if size of {fallingblocks.hard.location::*} is greater than 0:
- clear {fallingblocks.activate}
- stop
- else if size of {fallingblocks.soft.location::*} is 0:
- stop
- else if size of {fallingblocks.soft.location::*} is less than 400:
- if {_count} is greater than 5:
- stop
- else:
- if {_count} is greater than 12:
- stop
- on explosion:
- cancel event
- add east to {_listofdirections::*}
- add west to {_listofdirections::*}
- add south to {_listofdirections::*}
- add north to {_listofdirections::*}
- set {_loc} to event-location
- #loop blocks in radius 4 around block at {_loc}:
- loop blocks in radius 5.5 around block at {_loc}:
- #message "%loop-block's type%" to all players
- "%loop-block%" does not contain "air" or "water" or "lava":
- clear {_check}
- distance between loop-block and {_loc} is greater than 3.2:
- chance of 50%:
- set {_check} to true
- distance between loop-block and {_loc} is greater than 5:
- set {_check} to true
- if "%loop-block%" contains "torch" or "lever" or "sign" or "wheat" or "carrot" or "layer" or "potato" or "cake" or "button" or "long" or "stem" or "redstone" or "fire" or "wire" or "diode" or "door" or "sand" or "gravel" or "sapling" or "leaves" or "mushroom" or "poppy" or "dandelion" or "fern" or "orchid" or "allium" or "bluet" or "tulip" or "daisy" or "ladder" or "carpet" or "vine" or "lily" or "anvil" or "lilac" or "flower" or "rose" or "peony" or "bed" or "diode" or "comparator" or "plate" or "hook" or "rail":
- if "%loop-block%" does not contain "block":
- if "%loop-block%" contains "sign":
- set {fallingblocks.soft.sign.1::%location of loop-block%} to "%line 1 of loop-block%"
- set {fallingblocks.soft.sign.2::%location of loop-block%} to "%line 2 of loop-block%"
- set {fallingblocks.soft.sign.3::%location of loop-block%} to "%line 3 of loop-block%"
- set {fallingblocks.soft.sign.4::%location of loop-block%} to "%line 4 of loop-block%"
- #message "Soft" to all players
- set {fallingblocks.soft.location::%location of loop-block%} to location of loop-block
- set {fallingblocks.soft.blocktype::%location of loop-block%} to loop-block's type
- set {fallingblocks.soft.time::%location of loop-block%} to now
- add loop-block's location to {_blocks.soft::*}
- if {fallingblocks.soft.location::%location of loop-block%} is not set:
- if {_check} is not set:
- #message "Hard" to all players
- set {fallingblocks.hard.location::%location of loop-block%} to location of loop-block
- #message "%loop-block's type%" to all players
- set {fallingblocks.hard.blocktype::%location of loop-block%} to loop-block's type
- set {fallingblocks.hard.time::%location of loop-block%} to now
- add loop-block's location to {_blocks.hard::*}
- else if "%loop-block%" is "air":
- if {fallingblocks.hard.time::%location of loop-block%} is set:
- set {fallingblocks.hard.time::%location of loop-block%} to now
- else if {fallingblocks.soft.time::%location of loop-block%} is set:
- set {fallingblocks.soft.time::%location of loop-block%} to now
- loop {_blocks.soft::*}:
- set {_looploc} to location 1 above block at loop-value
- set {_block} to type of block at loop-value
- set block at loop-value to air
- spawn falling block of {_block} at {_looploc}
- wait 1 tick
- loop {_blocks.hard::*}:
- set {_looploc} to location 1 above block at loop-value
- set {_block} to type of block at loop-value
- set block at loop-value to air
- spawn falling block of {_block} at {_looploc}
- wait 1 tick
- loop entities in radius 6 around block at {_loc}:
- message "%loop-entity%"
- "%loop-entity%" is "falling block":
- set {listoffallingblock::%loop-entity%} to true
- set {_speed} to a random number between .3 and 1.2
- push loop-entity up at speed {_speed}
- set {_dir.1} to random element out of {_listofdirections::*}
- set {_dir.2} to random element out of {_listofdirections::*}
- set {_dir.3} to random element out of {_listofdirections::*}
- set {_dir.1.speed} to random number between .1 and .6
- set {_dir.2.speed} to random number between .1 and .6
- set {_dir.3.speed} to random number between .1 and .6
- push loop-entity {_dir.1} at speed {_dir.1.speed}
- push loop-entity {_dir.2} at speed {_dir.2.speed}
- push loop-entity {_dir.3} at speed {_dir.3.speed}
- wait 1 tick
- if size of {fallingblocks.hard.location::*} is greater than 0:
- set {fallingblocks.activate} to true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement