Skip to content

Commit

Permalink
Fixed tag compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
bill96012 committed Jan 18, 2020
1 parent 48b5b64 commit ab30136
Show file tree
Hide file tree
Showing 31 changed files with 51 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .datapack/cache.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion data/galaxy/functions/block/functional/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
function galaxy:block/functional/meta/scoreboard/register
execute as @a[tag=!InitializedBlockFunctionalScore] run function galaxy:block/functional/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyBlockFunctionalScore] run function galaxy:block/functional/meta/scoreboard/set_player_score
2 changes: 1 addition & 1 deletion data/galaxy/functions/block/functional/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute as @a[tag=!InitializedBlockFunctionalScore] run function galaxy:block/functional/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyBlockFunctionalScore] run function galaxy:block/functional/meta/scoreboard/set_player_score

execute as @e[tag=functional_placer] at @s run function galaxy:block/functional/placer/main

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scoreboard players remove @s statusBlockDisp 0

tag @s add InitializedBlockFunctionalScore
tag @s add InitializedGalaxyBlockFunctionalScore
9 changes: 9 additions & 0 deletions data/galaxy/functions/debug/clean_up-tag.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
tag @s remove InitializedGlobalScore
tag @s remove InitializedGalaxyScore
tag @s remove InitializedBlockFunctionalScore
tag @s remove InitializedToolScore
tag @s remove InitializedKatanaScore
tag @s remove InitializedEnergySaberScore
tag @s remove InitializedPistolScore
tag @s remove InitializedStatus_effectScore
tag @s remove InitializedHUDScore
13 changes: 7 additions & 6 deletions data/galaxy/functions/debug/remove_init_tag.mcfunction
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
tag @s remove InitializedGalaxyScore
tag @s remove InitializedToolScore
tag @s remove InitializedKatanaScore
tag @s remove InitializedEnergySaberScore
tag @s remove InitializedPistolScore
tag @s remove InitializedStatus_effectScore
tag @s remove InitializedHUDScore
tag @s remove InitializedGalaxyBlockFunctionalScore
tag @s remove InitializedGalaxyToolScore
tag @s remove InitializedGalaxyKatanaScore
tag @s remove InitializedGalaxyEnergySaberScore
tag @s remove InitializedGalaxyPistolScore
tag @s remove InitializedGalaxyStatusEffectScore
tag @s remove InitializedGalaxyHUDScore
2 changes: 1 addition & 1 deletion data/galaxy/functions/hud/initial.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
function galaxy:hud/meta/storage/register

function galaxy:hud/meta/scoreboard/register
execute as @a[tag=!InitializedHUDScore] run function galaxy:hud/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyHUDScore] run function galaxy:hud/meta/scoreboard/set_player_score

execute if score #galaxy_print_init Config matches 1 run tellraw @a ["",{"text":"[Galaxy]: ","color":"yellow","bold":true},{"text":"HUD: "},{"text":"Initialize complete!"}]
2 changes: 1 addition & 1 deletion data/galaxy/functions/hud/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute as @a[tag=!InitializedHUDScore] run function galaxy:hud/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyHUDScore] run function galaxy:hud/meta/scoreboard/set_player_score

execute if score #hud_katana Config matches 1 as @a run function galaxy:hud/katana/main
execute if score #hud_pistol Config matches 1 as @a run function galaxy:hud/pistol/main
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ scoreboard players remove @s isPistolHUD 0

scoreboard players remove @s hudPistol 0

tag @s add InitializedHUDScore
tag @s add InitializedGalaxyHUDScore
2 changes: 1 addition & 1 deletion data/galaxy/functions/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
function galaxy:meta/detector/main

execute as @a[tag=!InitializedGlobalScore] run function galaxy:meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyScore] run function galaxy:meta/scoreboard/set_player_score
2 changes: 1 addition & 1 deletion data/galaxy/functions/status_effect/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

function galaxy:status_effect/meta/scoreboard/register
execute as @a[tag=!InitializedStatusEffectScore] run function galaxy:status_effect/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyStatusEffectScore] run function galaxy:status_effect/meta/scoreboard/set_player_score

execute if score #galaxy_print_init Config matches 1 run tellraw @a ["",{"text":"[Galaxy]: ","color":"yellow","bold":true},{"text":"Status effect: "},{"text":"Initialize complete!"}]
2 changes: 1 addition & 1 deletion data/galaxy/functions/status_effect/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

execute as @a[tag=!InitializedStatusEffectScore] run function galaxy:status_effect/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyStatusEffectScore] run function galaxy:status_effect/meta/scoreboard/set_player_score

execute if score #stu_stun Config matches 1 run function galaxy:status_effect/stun
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ scoreboard players remove @s isStuStun 0
scoreboard players remove @s durStuStun 0


tag @s add InitializedStatusEffectScore
tag @s add InitializedGalaxyStatusEffectScore
2 changes: 1 addition & 1 deletion data/galaxy/functions/tool/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

function galaxy:tool/meta/scoreboard/register
execute as @a[tag=!InitializedToolScore] run function galaxy:tool/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyToolScore] run function galaxy:tool/meta/scoreboard/set_player_score

execute if score #galaxy_print_init Config matches 1 run tellraw @a ["",{"text":"[Galaxy]: ","color":"yellow","bold":true},{"text":"Tool: "},{"text":"Initialize complete!"}]
2 changes: 1 addition & 1 deletion data/galaxy/functions/tool/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute as @a[tag=!InitializedToolScore] run function galaxy:tool/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyToolScore] run function galaxy:tool/meta/scoreboard/set_player_score
function galaxy:tool/meta/detector/main

execute if score #structure_empower Config matches 1 as @e[tag=structure_empower_detector] at @s if predicate galaxy:configurable/structure_empower_success_chance run function galaxy:tool/structure_empower
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ scoreboard players remove @s shieldFull 0

scoreboard players remove @s shieldHealthy 0

tag @s add InitializedToolScore
tag @s add InitializedGalaxyToolScore
2 changes: 2 additions & 0 deletions data/galaxy/functions/version_check.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ execute if score #galaxy_version Meta = #galaxy_currently_version Meta if score
scoreboard players operation #galaxy_currently_version Meta = #galaxy_version Meta

scoreboard players remove @s versionGalaxy 0
execute as @a unless score @s versionGalaxy = #galaxy_currently_version Meta run function galaxy:debug/clean_up-scoreboard
execute as @a unless score @s versionGalaxy = #galaxy_currently_version Meta run function galaxy:debug/clean_up-tag
execute as @a unless score @s versionGalaxy = #galaxy_currently_version Meta run function galaxy:debug/remove_init_tag
execute as @a unless score @s versionGalaxy = #galaxy_currently_version Meta run scoreboard players operation @s versionGalaxy = #galaxy_currently_version Meta
2 changes: 2 additions & 0 deletions data/galaxy/functions/weapon/energy_saber/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function galaxy:weapon/energy_saber/meta/scoreboard/register
execute as @a[tag=!InitializedGalaxyEnergySaberScore] run function galaxy:weapon/energy_saber/meta/scoreboard/set_player_score
2 changes: 1 addition & 1 deletion data/galaxy/functions/weapon/energy_saber/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute as @a[tag=!InitializedEnergySaberScore] run function galaxy:weapon/energy_saber/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyEnergySaberScore] run function galaxy:weapon/energy_saber/meta/scoreboard/set_player_score

function galaxy:weapon/energy_saber/action/main
function galaxy:weapon/energy_saber/cooldown/main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ scoreboard players remove @s cdActTurnOn 0

scoreboard players remove @s cdActTurnOff 0

tag @s add InitializedEnergySaberScore
tag @s add InitializedGalaxyEnergySaberScore
12 changes: 3 additions & 9 deletions data/galaxy/functions/weapon/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@

function galaxy:weapon/katana/meta/scoreboard/register
execute as @a[tag=!InitializedKatanaScore] run function galaxy:weapon/katana/meta/scoreboard/set_player_score

function galaxy:weapon/energy_saber/meta/scoreboard/register
execute as @a[tag=!InitializedEnergySaberScore] run function galaxy:weapon/energy_saber/meta/scoreboard/set_player_score

function galaxy:weapon/pistol/meta/scoreboard/register
execute as @a[tag=!InitializedPistolScore] run function galaxy:weapon/pistol/meta/scoreboard/set_player_score
function galaxy:weapon/katana/initial
function galaxy:weapon/energy_saber/initial
function galaxy:weapon/pistol/initial

execute if score #galaxy_print_init Config matches 1 run tellraw @a ["",{"text":"[Galaxy]: ","color":"yellow","bold":true},{"text":"Weapon: "},{"text":"Initialize complete!"}]
2 changes: 2 additions & 0 deletions data/galaxy/functions/weapon/katana/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function galaxy:weapon/katana/meta/scoreboard/register
execute as @a[tag=!InitializedGalaxyKatanaScore] run function galaxy:weapon/katana/meta/scoreboard/set_player_score
2 changes: 1 addition & 1 deletion data/galaxy/functions/weapon/katana/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute as @a[tag=!InitializedKatanaScore] run function galaxy:weapon/katana/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyKatanaScore] run function galaxy:weapon/katana/meta/scoreboard/set_player_score

function galaxy:weapon/katana/action/main
function galaxy:weapon/katana/cooldown/main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ scoreboard players remove @s cdActStun 0

scoreboard players remove @s cdActFlash 0

tag @s add InitializedKatanaScore
tag @s add InitializedGalaxyKatanaScore
2 changes: 2 additions & 0 deletions data/galaxy/functions/weapon/pistol/initial.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
function galaxy:weapon/pistol/meta/scoreboard/register
execute as @a[tag=!InitializedGalaxyPistolScore] run function galaxy:weapon/pistol/meta/scoreboard/set_player_score
2 changes: 1 addition & 1 deletion data/galaxy/functions/weapon/pistol/main.mcfunction
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
execute as @a[tag=!InitializedPistolScore] run function galaxy:weapon/pistol/meta/scoreboard/set_player_score
execute as @a[tag=!InitializedGalaxyPistolScore] run function galaxy:weapon/pistol/meta/scoreboard/set_player_score

function galaxy:weapon/pistol/meta/detector/main
execute as @e[tag=pistolBullet] at @s run function galaxy:weapon/pistol/bullet/main
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# init pistol UUID score
execute as @a[tag=!InitializedPistolUUIDScore] run function galaxy:weapon/pistol/meta/scoreboard/set_player_score-pistol_uuid
execute as @a[tag=!InitializedGalaxyPistolUUIDScore] run function galaxy:weapon/pistol/meta/scoreboard/set_player_score-pistol_uuid

execute if score @s holdPistol matches 1 run tag @s add detectHandMain
execute if score @s holdPistol matches 2 run tag @s add detectHandMain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ execute store result score @s MhPistolUUIDL run data get entity @s SelectedItem.
execute store result score @s FhPistolUUIDM run data get entity @s Inventory[{Slot:-106b}].tag.miniUUIDMost
execute store result score @s FhPistolUUIDL run data get entity @s Inventory[{Slot:-106b}].tag.miniUUIDLeast

tag @s add InitializedPistolUUIDScore
tag @s add InitializedGalaxyPistolUUIDScore
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ scoreboard players remove @s optPistolBltSped 0

scoreboard players remove @s optPistolBltOfst 0

tag @s add InitializedPistolScore
tag @s add InitializedGalaxyPistolScore
4 changes: 1 addition & 3 deletions data/minecraft/tags/functions/load.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"values":[
"galaxy:initial",
"creative-utilities:initial",
"math:initial"
"galaxy:initial"
]
}
3 changes: 1 addition & 2 deletions data/minecraft/tags/functions/tick.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"values":[
"galaxy:tick",
"creative-utilities:tick"
"galaxy:tick"
]
}

0 comments on commit ab30136

Please sign in to comment.