Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
Adding 1.0 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenTholen committed Dec 23, 2018
1 parent 8ff37a8 commit 2bcd447
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 4 deletions.
4 changes: 2 additions & 2 deletions warpbook-pack/bookcode.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MinecraftJSON Import Code:
{"command":"/give @p written_book{pages:%s,title:CustomBook,author:Player}","jobject":[{"text":" The Wanderer’s Tome\\n"},{"text":"\\nThis ancient book seems\\nto grant the user the\\nability to travel to any\\nof the locations listed\\nwithin its pages. Simply\\nopen the book and \\npicture where you wish to\\ngo, and the Wanderer’s\\nTome will take you there,\\nat the cost of your own \\nvitality.","color":"dark_gray"},{"NEW_ITERATE_FLAG":true},{"text":"You can pick a location\\nand the book will teleport\\nthem to the Sanctuary at \\nhat location, but at the\\ncost of (X) hearts each\\ntime.\\nAdditional Sanctuaries will\\nbe added as needed.","color":"dark_gray"},{"NEW_ITERATE_FLAG":true},{"text":" Sanctuaries","bold":true},{"text":"\\nThe Crystal Ruins","color":"dark_gray"},{"text":"\\nTownsend","color":"red"},{"text":"\\nMarket","color":"dark_green"},{"text":"\\nShadowfall Arena","color":"dark_red"},{"text":"\\n Wildernesses:","color":"dark_green","bold":true},{"text":"\\nNorthern","color":"dark_green"},{"text":"\\nEastern","color":"dark_green"},{"text":"\\nSouthern","color":"dark_green"},{"text":"\\nWestern","color":"dark_green"},{"text":"\\nNortheastern","color":"dark_green"},{"text":"\\nSoutheastern","color":"dark_green"},{"text":"\\nNorthwestern","color":"dark_green"},{"text":"\\nSouthwestern","color":"dark_green"}],"jtemplate":"book"}
give @p written_book{pages:["[\"\",{\"text\":\" The Wanderer’s Tome\\n\"},{\"text\":\"\\nThis ancient book seems\\nto grant the user the\\nability to travel to any\\nof the locations listed\\nwithin its pages. Simply\\nopen the book and \\npicture where you wish to\\ngo, and the Wanderer’s\\nTome will take you there,\\nat the cost of your own \\nvitality.\",\"color\":\"dark_gray\"}]","[\"\",{\"text\":\" Sanctuaries\",\"bold\":true},{\"text\":\"\\nThe Crystal Ruins\",\"color\":\"dark_gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 1\"},\"bold\":false},{\"text\":\"\\nTownsend\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 2\"}},{\"text\":\"\\nMarket\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 3\"}},{\"text\":\"\\nShadowfall Arena\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 4\"}}]","[\"\",{\"text\":\"Wildernesses:\",\"color\":\"dark_green\",\"bold\":true},{\"text\":\"\\nNorthern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 5\"},\"bold\":false},{\"text\":\"\\nEastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 6\"}},{\"text\":\"\\nSouthern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 7\"}},{\"text\":\"\\nWestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 8\"}},{\"text\":\"\\nNortheastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 9\"}},{\"text\":\"\\nSoutheastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 10\"}},{\"text\":\"\\nNorthwestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 11\"}},{\"text\":\"\\nSouthwestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 12\"}}]","[\"\",{\"text\":\"Call a new Tomb\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpupdatet set 1\"}}]"],title:Tome,author:Lasciel}
Actual Book Command:
/give @p written_book{pages:["[\"\",{\"text\":\" The Wanderer’s Tome\\n\"},{\"text\":\"\\nThis ancient book seems\\nto grant the user the\\nability to travel to any\\nof the locations listed\\nwithin its pages. Simply\\nopen the book and \\npicture where you wish to\\ngo, and the Wanderer’s\\nTome will take you there,\\nat the cost of your own \\nvitality.\",\"color\":\"dark_gray\"}]","[\"\",{\"text\":\"You can pick a location\\nand the book will teleport\\nthem to the Sanctuary at \\nhat location, but at the\\ncost of (X) hearts each\\ntime.\\nAdditional Sanctuaries will\\nbe added as needed.\",\"color\":\"dark_gray\"}]","[\"\",{\"text\":\" Sanctuaries\",\"bold\":true},{\"text\":\"\\nThe Crystal Ruins\",\"color\":\"dark_gray\",\"bold\":false},{\"text\":\"\\nTownsend\",\"color\":\"red\"},{\"text\":\"\\nMarket\",\"color\":\"dark_green\"},{\"text\":\"\\nShadowfall Arena\",\"color\":\"dark_red\"},{\"text\":\"\\n Wildernesses:\",\"color\":\"dark_green\",\"bold\":true},{\"text\":\"\\nNorthern\",\"color\":\"dark_green\",\"bold\":false},{\"text\":\"\\nEastern\",\"color\":\"dark_green\"},{\"text\":\"\\nSouthern\",\"color\":\"dark_green\"},{\"text\":\"\\nWestern\",\"color\":\"dark_green\"},{\"text\":\"\\nNortheastern\",\"color\":\"dark_green\"},{\"text\":\"\\nSoutheastern\",\"color\":\"dark_green\"},{\"text\":\"\\nNorthwestern\",\"color\":\"dark_green\"},{\"text\":\"\\nSouthwestern\",\"color\":\"dark_green\"}]"],title:CustomBook,author:Player}
/give @p written_book{pages:["[\"\",{\"text\":\" The Wanderer’s Tome\\n\"},{\"text\":\"\\nThis ancient book seems\\nto grant the user the\\nability to travel to any\\nof the locations listed\\nwithin its pages. Simply\\nopen the book and \\npicture where you wish to\\ngo, and the Wanderer’s\\nTome will take you there,\\nat the cost of your own \\nvitality.\",\"color\":\"dark_gray\"}]","[\"\",{\"text\":\" Sanctuaries\",\"bold\":true},{\"text\":\"\\nThe Crystal Ruins\",\"color\":\"dark_gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 1\"},\"bold\":false},{\"text\":\"\\nTownsend\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 2\"}},{\"text\":\"\\nMarket\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 3\"}},{\"text\":\"\\nShadowfall Arena\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 4\"}}]","[\"\",{\"text\":\"Wildernesses:\",\"color\":\"dark_green\",\"bold\":true},{\"text\":\"\\nNorthern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 5\"},\"bold\":false},{\"text\":\"\\nEastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 6\"}},{\"text\":\"\\nSouthern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 7\"}},{\"text\":\"\\nWestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 8\"}},{\"text\":\"\\nNortheastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 9\"}},{\"text\":\"\\nSoutheastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 10\"}},{\"text\":\"\\nNorthwestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 11\"}},{\"text\":\"\\nSouthwestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 12\"}}]","[\"\",{\"text\":\"Call a new Tomb\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpupdatet set 1\"}}]"],title:The Wanderer's Tome,author:Lasciel}
3 changes: 2 additions & 1 deletion warpbook-pack/data/main/functions/givebook.mcfunction
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#REPLACE THIS COMMAND:
give
give @p written_book{pages:["[\"\",{\"text\":\" The Wanderer’s Tome\\n\"},{\"text\":\"\\nThis ancient book seems\\nto grant the user the\\nability to travel to any\\nof the locations listed\\nwithin its pages. Simply\\nopen the book and \\npicture where you wish to\\ngo, and the Wanderer’s\\nTome will take you there,\\nat the cost of your own \\nvitality.\",\"color\":\"dark_gray\"}]","[\"\",{\"text\":\" Sanctuaries\",\"bold\":true},{\"text\":\"\\nThe Crystal Ruins\",\"color\":\"dark_gray\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 1\"},\"bold\":false},{\"text\":\"\\nTownsend\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 2\"}},{\"text\":\"\\nMarket\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 3\"}},{\"text\":\"\\nShadowfall Arena\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 4\"}}]","[\"\",{\"text\":\"Wildernesses:\",\"color\":\"dark_green\",\"bold\":true},{\"text\":\"\\nNorthern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 5\"},\"bold\":false},{\"text\":\"\\nEastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 6\"}},{\"text\":\"\\nSouthern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 7\"}},{\"text\":\"\\nWestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 8\"}},{\"text\":\"\\nNortheastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 9\"}},{\"text\":\"\\nSoutheastern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 10\"}},{\"text\":\"\\nNorthwestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 11\"}},{\"text\":\"\\nSouthwestern\",\"color\":\"dark_green\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpbook set 12\"}}]","[\"\",{\"text\":\"Call a new Tomb\",\"color\":\"dark_red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger warpupdatet set 1\"}}]"],title:Tome,author:Lasciel}
scoreboard players set @s warpupdate 1
2 changes: 2 additions & 0 deletions warpbook-pack/data/main/functions/init.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ say look at that it's a datapack
scoreboard objectives add warpbook trigger
scoreboard objectives add tick dummy
scoreboard objectives add warpcooldown dummy
scoreboard objectives add warpupdate dummy
scoreboard objectives add warpupdatet trigger
3 changes: 3 additions & 0 deletions warpbook-pack/data/main/functions/master.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
#Adds To the tick counter to time seconds
scoreboard players add #tick tick 1
scoreboard players enable @a warpbook
scoreboard players enable @a warpupdatet
execute as @a unless score @s warpupdate matches 1 run scoreboard players set @s warpupdate 0
execute as @a if score @s warpupdatet matches 1 run function main:update
#Run the main warping command if a player has pushed the book button
execute as @a if score @s warpbook matches 1.. run function main:warp
# Every 1 second
Expand Down
25 changes: 25 additions & 0 deletions warpbook-pack/data/main/functions/tp.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,33 @@ scoreboard players set @s warpcooldown 30
#Step 4: to enable the autoupdate button, run /function main:resetupdate
#That's it! You're done!

#The crystal Ruins
#execute if score @s warpbook matches 1 run tp
#Townsend
execute if score @s warpbook matches 2 run tp @s 5156 83 5829
#Market
execute if score @s warpbook matches 3 run tp @s 318 131 15527
#Shadowfall Arena
execute if score @s warpbook matches 4 run tp @s 5162 65 1470
#Northern
execute if score @s warpbook matches 5 run tp @s 434 80 -828
#Eastern
execute if score @s warpbook matches 6 run tp @s 1412 88 154
#Souther
execute if score @s warpbook matches 7 run tp @s 407 95 1267
#Western
execute if score @s warpbook matches 8 run tp @s -742 90 95
#Northeastern
execute if score @s warpbook matches 9 run tp @s 1419 132 -824
#Southeastern
execute if score @s warpbook matches 10 run tp @s 1374 86 1150
#Northwestern
execute if score @s warpbook matches 11 run tp @s -508 77 -825
#Southwestern
execute if score @s warpbook matches 12 run tp @s -507 83 1150

#BEFORE HERE
scoreboard players set @s warpbook 0
#Play fancy particle effects
execute at @s run particle minecraft:totem_of_undying ~.1 ~.1 ~.1 0 0 0 0.7 250 force
execute at @s run playsound minecraft:block.beacon.ambient voice @s ~ ~ ~ 100
9 changes: 9 additions & 0 deletions warpbook-pack/data/main/functions/update.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Desc: Runs when a player needs a update
#
# Called by: #minecraft:tick
execute if score @s warpupdate matches 0 run tellraw @s ["",{"text":"You have summoned the Wanderer's Tome. There is new knowledge to behold.","color":"green"}]
execute if score @s warpupdate matches 1 run tellraw @s ["",{"text":"You hold the Wanderer's Tome. There can be no other.","color":"red"}]
execute if score @s warpupdate matches 1 run playsound minecraft:block.beacon.deactivate voice @s ~ ~ ~ 100
execute if score @s warpupdate matches 0 run playsound minecraft:entity.evoker.prepare_summon voice @s ~ ~ ~ 100
execute if score @s warpupdate matches 0 run function main:givebook
scoreboard players set @s warpupdatet 0
1 change: 0 additions & 1 deletion warpbook-pack/data/main/functions/warp.mcfunction
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Desc: Template for each warp
#
# Called by: nothing
scoreboard players set @s warpbook 0
execute if score @s warpcooldown matches 1.. run function main:cooldown
execute if score @s warpcooldown matches 0 run function main:tp

0 comments on commit 2bcd447

Please sign in to comment.