Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #- Originally By Mortimier for Chunk Apocalypse
- #- Edited By DancingNinjas_ for Sky Ores
- options:
- P: &b[&aSkyOres&b]&b
- command /skyores <integer> <integer> <world>:
- permission: skript.op
- usage: /skyores <map radius> <radius of blocks to change every 5 ticks> <world name>
- trigger:
- set {_chunknum} to 2*arg 1/arg 2
- set {_chunkx} to arg 1
- set {_chunkz} to arg 1
- set {_size} to arg 2
- broadcast "{@P} Generating Sky Ores in '%arg 3%'! There may be lag!"
- loop {_chunknum} times:
- loop {_chunknum} times:
- {skyores.cancel} is true:
- set {skyores.cancel} to false
- stop trigger
- send "{@P} Converting Ores at x: %{_chunkx}%, z: %{_chunkz}%" to all ops
- loop blocks from (block at (the location at {_chunkx}, 138, {_chunkz} in arg 3)) to (block at (the location at ({_chunkx}-{_size}+1), 128, {_chunkz} in arg 3)):
- loop blocks from (loop-block-1) to (the block ({_size}-1) meters north of loop-block-1):
- loop blocks from (loop-block-2) to (the block 128 meters below loop-block-2):
- if loop-block-3 is iron ore or diamond ore or gold ore or lapis ore or redstone ore or coal ore or emerald ore:
- set block at location (loop-block-3's x coordinate), (256 - (loop-block-3's y coordinate)), (loop-block-3's z coordinate) in arg-3 to block at loop-block-3
- set block at loop-block-3 to stone
- wait 5 ticks
- subtract arg 2 from {_chunkx}
- set {_chunkx} to arg 1
- subtract {_size} from {_chunkz}
- send "{@P} Sky Ores Process Finished!" to all ops
- command /skyorescancel:
- permission: skript.op
- trigger:
- set {skyores.cancel} to true
- send "{@P} Sky Ores Process Cancelled!" to all ops
Advertisement
Add Comment
Please, Sign In to add comment