Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function islandTreeDir(l: location) :: location:
- set {_v} to new vector from yaw (360 or 270 or 180 or 90) and pitch 0
- set normal length of {_v} to 1
- set {_l} to ({_l} ~ {_v})
- #------
- return {_l}
- function islandTree(l: location):
- set block at {_l} and block 1 meter above {_l} to spruce log
- set {_l} to location of block 1 meter above {_l}
- loop 3 times:
- set {_l} to islandTreeDir({_l})
- set block at {_l} and block 1 meter above {_l} to spruce log
- set {_l} to location 1 meter above {_l}
- #-------------
- set {_l} to block above {_l}
- loop blocks in radius 3 of {_l}:
- set {_h} to difference between y-coord of {_l} and y-coord of loop-block
- {_h} <= 0
- loop-block is air
- set loop-block to spruce leaves
- loop blocks in radius 2 of {_l}:
- set {_h} to difference between y-coord of {_l} and y-coord of loop-block
- {_h} = 1
- loop-block is air
- set loop-block to spruce leaves
- function islandspawn(l: location):
- loop blocks in radius 4 of {_l}:
- y-coord of loop-block <= y-coord of {_l}:
- set loop-block to grass block or grass path
- islandTree({_l})
- loop blocks in radius 3 of {_l}:
- loop-block is grass block or grass path
- block 1 meter above loop-block is air
- set block 1 meter above loop-block to barrel
- stop
- #-------//////--------
- # Code split
- #-------//////--------
- function dir(l: location, c: integer) :: location:
- set {_v} to new vector from yaw {_c} and pitch 0
- set normal length of {_v} to 200
- set {_l} to ({_l} ~ {_v})
- #------
- return {_l}
- function checkforNEWisland(p: player):
- set {_baseloc} to location at 100, 70, 100 in world "world"
- set {_l} to {_baseloc}
- set {_angle} to 90
- set {_CheckIsland} to true
- set {_baseNumber} to 0
- set {_baseC} to 4
- set {_turn} to 1
- #------------------------------
- while {_CheckIsland} is true:
- add 1 to {_IFturn}
- {_baseNumber} = {_baseC}:
- set {_baseNumber} to 0
- add 2 to {_turn}
- add 8 to {_baseC}
- add 5 to x-coord of {_l}
- add 5 to z-coord of {_l}
- #------------
- {_IFturn} = {_turn}:
- add 90 to {_angle}
- set {_IFturn} to 0
- {_angle} = 360:
- set {_angle} to 0
- #------------
- set {_l} to dir({_l}, {_angle})
- block at {_l} = air:
- islandspawn({_l})
- loop blocks in radius 5 of {_l}:
- loop-block is grass block or grass path:
- teleport {_p} to block 1 meter above loop-block
- set {island::%{_p}%} to location of block at {_p}
- send " &cPlease reset your island spawn point!" to {_p}
- send " &7Use the command &3/island" to {_p}
- delete {_CheckIsland}
- stop
- #---------
- add 1 to {_baseNumber}
- command /t:
- trigger:
- checkforNEWisland(player)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement