Skip to content

Commit

Permalink
2.2 version addon support
Browse files Browse the repository at this point in the history
  • Loading branch information
LTHCTheMaster committed Jul 27, 2021
1 parent 3329072 commit abbceeb
Show file tree
Hide file tree
Showing 15 changed files with 55 additions and 14 deletions.
3 changes: 3 additions & 0 deletions data/lthc.lmasu/functions/lthc.lmasu/craft/craft.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,6 @@ execute if predicate lthc.lmasu:lthc.lmasu/craft/spells/three/multi_lightning ru
execute if predicate lthc.lmasu:lthc.lmasu/craft/spells/four/animal_killer run function lthc.lmasu:lthc.lmasu/craft/spells/elements_four/animal_killer
# Monster Killer Spell
execute if predicate lthc.lmasu:lthc.lmasu/craft/spells/four/monster_killer run function lthc.lmasu:lthc.lmasu/craft/spells/elements_four/monster_killer

#Addon
function #lthc.lmasu:addon/craft
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Desc: The loading/reloading message
# -------------------------

tellraw @a ["",{"text":"LTHC's Magic And Spells Universe ","bold":true,"underlined":true,"color":"#FFFF00"},{"text":"was loaded","underlined":true,"color":"#FFFF00"},{"text":"\n"},{"text":"Thanks for use this datapack of magic","color":"red"},{"text":"\n"},{"text":"You can claim guide books with ","color":"green"},{"text":"/trigger lmasu_books","color":"green","clickEvent":{"action":"copy_to_clipboard","value":"/trigger lmasu_books"}},{"text":" \n"},{"text":"Author: LTHC\nCredits: Thanks to ","color":"light_purple"},{"text":"DataWorld","bold":true,"underlined":true,"color":"light_purple","clickEvent":{"action":"open_url","value":"https://discord.me/dataworld"}},{"text":" Discord","underlined":true,"color":"light_purple"},{"text":" for help","color":"light_purple"},{"text":"\n"},{"text":"Github link: ","color":"aqua"},{"text":"click here","bold":true,"underlined":true,"color":"aqua","clickEvent":{"action":"open_url","value":"https://github.com/LTHCTheMaster/LTHC-s-Magic-And-Spells-Universe"}},{"text":"\n __ __ __\n\u263a Enjoy magic \u263a"},{"text": "\nIf you want to give to you or another player you can use functions started with \"can_config\" in \"lthc.lmasu:lthc.lmasu/admin/admin_tools\"","color": "#FFCC33"}]
tellraw @a ["",{"text":"LTHC's Magic And Spells Universe v2.2","bold":true,"underlined":true,"color":"#FFFF00"},{"text":"was loaded","underlined":true,"color":"#FFFF00"},{"text":"\n"},{"text":"Thanks for use this datapack of magic","color":"red"},{"text":"\n"},{"text":"You can claim guide books with ","color":"green"},{"text":"/trigger lmasu_books","color":"green","clickEvent":{"action":"copy_to_clipboard","value":"/trigger lmasu_books"}},{"text":" \n"},{"text":"Author: LTHC\nCredits: Thanks to ","color":"light_purple"},{"text":"DataWorld","bold":true,"underlined":true,"color":"light_purple","clickEvent":{"action":"open_url","value":"https://discord.me/dataworld"}},{"text":" Discord","underlined":true,"color":"light_purple"},{"text":" for help","color":"light_purple"},{"text":"\n"},{"text":"Github link: ","color":"aqua"},{"text":"click here","bold":true,"underlined":true,"color":"aqua","clickEvent":{"action":"open_url","value":"https://github.com/LTHCTheMaster/LTHC-s-Magic-And-Spells-Universe"}},{"text":"\n __ __ __\n\u263a Enjoy magic \u263a"},{"text": "\nIf you want to give to you or another player you can use functions started with \"can_config\" in \"lthc.lmasu:lthc.lmasu/admin/admin_tools\"","color": "#FFCC33"}]
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@ schedule function lthc.lmasu:lthc.lmasu/mob_levels/manager 9t replace
schedule function lthc.lmasu:lthc.lmasu/lmasu_clear_lag/lmasu_clear_lag 120s replace
schedule function lthc.lmasu:lthc.lmasu/lmasu_clear_lag/scan 5s replace

#Addon
function #lthc.lmasu:addon/schedule

#Core
schedule function lthc.lmasu:lthc.lmasu/main/core 1t replace
Original file line number Diff line number Diff line change
Expand Up @@ -86,5 +86,5 @@ scoreboard objectives add lmasu_mblvl dummy
scoreboard objectives add lmasu_cllg_count dummy
scoreboard objectives add lmasu_cllg_time dummy

#Guide Book Link To LTHC.Utils
scoreboard objectives add lthc.lmasu.utils trigger
#Addon
function #lthc.lmasu:addon/scoreboard
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#Create scoreboard in scoreboarder
function lthc.lmasu:lthc.lmasu/init_lthc/scoreboarder

# Set version variable in format xx.xx.xx (current 1.10 so 011000 (01.10.00))
scoreboard players set $lthc.version lmasu.data 011000
# Set version variable in format xx.xx.xx (current 2.2 so 020200 (02.02.00))
scoreboard players set $lthc.version lmasu.data 020200

# Summon marker entity at the worldspawn
summon minecraft:marker ~ ~ ~ {UUID: [I; 1711620732, -230536421, -1552235838, 1782417117],Tags:["lmasu_mklrl"]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Desc: Loading system
# -------------------------

# Set version variable in format xx.xx.xx (current 1.10 so 011000 (01.10.00))
scoreboard players set $lthc.version lmasu.data 011000
# Set version variable in format xx.xx.xx (current 2.2 so 020200 (02.02.00))
scoreboard players set $lthc.version lmasu.data 020200

# Summon new marker entity at the worldspawn
summon minecraft:marker ~ ~ ~ {UUID: [I; 1711620732, -230536421, -1552235838, 1782417117],Tags:["lmasu_mklrl"]}
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

# Add basic scoreboards
scoreboard objectives add lmasu.data dummy
# Initializes the datapack at the first startup or new version (version format: xx.xx.xx (current 1.10 so 011000 (01.10.00)))
# Initializes the datapack at the first startup or new version (version format: xx.xx.xx (current 2.2 so 020200 (02.02.00)))
execute unless score $lthc.first_run lmasu.data matches 1 run function lthc.lmasu:lthc.lmasu/loading/first_run/main
execute if score $lthc.first_run lmasu.data matches 1 unless score $lthc.version lmasu.data matches 011000 run function lthc.lmasu:lthc.lmasu/loading/first_run/update
execute if score $lthc.first_run lmasu.data matches 1 unless score $lthc.version lmasu.data matches 020200 run function lthc.lmasu:lthc.lmasu/loading/first_run/update

# Saves that the datapack was started
scoreboard players set .lthc lmasu.ls 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ scoreboard players add @a lmasu_snktime 0
scoreboard players add @a lmasu_noarrs 0
scoreboard players add @a lmasu_books 0
scoreboard players enable @a lmasu_books
scoreboard players enable @a lthc.lmasu.utils
execute as @a unless score @s lmasu_mglvl matches -2147483648..2147483647 run scoreboard players set @s lmasu_mglvl 1
scoreboard players add @a lmasu_mglvlxp 0
scoreboard players add @a lmasu_traveller 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ scoreboard objectives remove lmasu_cllg_count
scoreboard objectives remove lmasu_cllg_time
scoreboard objectives remove lmasu.ls
scoreboard objectives remove lmasu.data
scoreboard objectives remove lthc.lmasu.utils

#Schedule clear
schedule clear lthc.lmasu:lthc.lmasu/rune/run
Expand All @@ -75,6 +74,7 @@ schedule clear lthc.lmasu:lthc.lmasu/bosses/summon_netherian
schedule clear lthc.lmasu:lthc.lmasu/mob_levels/manager
schedule clear lthc.lmasu:lthc.lmasu/lmasu_clear_lag/lmasu_clear_lag
schedule clear lthc.lmasu:lthc.lmasu/lmasu_clear_lag/scan
schedule clear lthc.lmasu:lthc.lmasu/main/core

#Kill Marker(s)
kill @e[tag=lmasu_mklrl]
Expand All @@ -84,6 +84,11 @@ kill @e[tag=lmasu_cllg]
execute as @e[tag=lmasu_frzfal] run data modify entity @s NoAI set value 0b
execute as @e[tag=lmasu_powfrz] run data modify entity @s NoAI set value 0b

#Addon
function #lthc.lmasu:addon/uninstall

#Disable datapack
datapack disable "file/lthc-s-magic-and-spells-universe_1.10v"
datapack disable "file/lthc-s-magic-and-spells-universe_1.10v.zip"
datapack disable "file/lthc-s-magic-and-spells-universe_2.2v"
datapack disable "file/lthc-s-magic-and-spells-universe"
datapack disable "file/lthc-s-magic-and-spells-universe_2.2v.zip"
datapack disable "file/lthc-s-magic-and-spells-universe.zip"
6 changes: 6 additions & 0 deletions data/lthc.lmasu/tags/functions/addon/core.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [

]
}
6 changes: 6 additions & 0 deletions data/lthc.lmasu/tags/functions/addon/craft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [

]
}
6 changes: 6 additions & 0 deletions data/lthc.lmasu/tags/functions/addon/schedule.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [

]
}
6 changes: 6 additions & 0 deletions data/lthc.lmasu/tags/functions/addon/scoreboard.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [

]
}
6 changes: 6 additions & 0 deletions data/lthc.lmasu/tags/functions/addon/uninstall.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [

]
}
3 changes: 2 additions & 1 deletion data/lthc.lmasu/tags/functions/lthc.lmasu/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"lthc.lmasu:lthc.lmasu/bosses/core_ovb",
"lthc.lmasu:lthc.lmasu/main/call_menu",
"lthc.lmasu:lthc.lmasu/bosses/netherian/action_ctrl",
"lthc.lmasu:lthc.lmasu/main/no_cooldown"
"lthc.lmasu:lthc.lmasu/main/no_cooldown",
"#lthc.lmasu:addon/core"
]
}

0 comments on commit abbceeb

Please sign in to comment.