Skip to content

Commit

Permalink
Format, add missing newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
clo4 committed Mar 12, 2024
1 parent 70bd885 commit 83ea472
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion afk-sleep/data/afk_sleep/functions/calculate.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ scoreboard players operation .playersSleepingPercentage afk_sleep.dummy = .notAF
scoreboard players operation .playersSleepingPercentage afk_sleep.dummy *= .relativePercentage afk_sleep.dummy
scoreboard players operation .playersSleepingPercentage afk_sleep.dummy /= .totalPlayers afk_sleep.dummy
execute store result storage afk_sleep:set_percentage_args percent int 1 run scoreboard players get .playersSleepingPercentage afk_sleep.dummy
function afk_sleep:set_percentage with storage afk_sleep:set_percentage_args
function afk_sleep:set_percentage with storage afk_sleep:set_percentage_args
2 changes: 1 addition & 1 deletion afk-sleep/data/afk_sleep/functions/first_load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ scoreboard players set .hasLoadedOnce afk_sleep.dummy 1

# We're assuming that whatever the percentage is set to when the datapack is loaded is the
# relative percentage of players that need to be sleeping in order for
execute store result score .relativePercentage afk_sleep.dummy run gamerule playersSleepingPercentage
execute store result score .relativePercentage afk_sleep.dummy run gamerule playersSleepingPercentage
2 changes: 1 addition & 1 deletion afk-sleep/data/afk_sleep/functions/load.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ scoreboard objectives add afk_sleep.dummy dummy
#declare entity .playersSleepingPercentage The final calculated playersSleepingPercentage.
#declare storage afk_sleep:set_percentage_args Arguments to call the set_percentage function with.

execute unless score .hasLoadedOnce afk_sleep.dummy matches 1 run function afk_sleep:first_load
execute unless score .hasLoadedOnce afk_sleep.dummy matches 1 run function afk_sleep:first_load
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$gamerule playersSleepingPercentage $(percent)
$gamerule playersSleepingPercentage $(percent)
2 changes: 1 addition & 1 deletion afk-sleep/data/afk_sleep/functions/uninstall.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ execute store result storage afk_sleep:set_percentage_args percent int 1 run sco
function afk_sleep:set_percentage with storage afk_sleep:set_percentage_args

scoreboard objectives remove afk_sleep.dummy
data remove storage afk_sleep:set_percentage_args percent
data remove storage afk_sleep:set_percentage_args percent
2 changes: 1 addition & 1 deletion afk/data/afk/functions/tag/away.mcfunction
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
tag @s add afk
execute as @s at @s run function #afk:away
execute as @s at @s run function #afk:away
2 changes: 1 addition & 1 deletion afk/data/afk/functions/tag/back.mcfunction
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
tag @s remove afk
execute as @s at @s run function #afk:back
execute as @s at @s run function #afk:back
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ for pack in $packs; do
rm LICENSE

echo
done
done
5 changes: 1 addition & 4 deletions chickenfix/data/minecraft/tags/functions/load.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{
"values": [
"chickenfix:load",
"chickenfix:loop"
]
"values": ["chickenfix:load", "chickenfix:loop"]
}
4 changes: 1 addition & 3 deletions chickenfix/data/minecraft/tags/functions/tick.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"values": [
"chickenfix:tick"
]
"values": ["chickenfix:tick"]
}
4 changes: 3 additions & 1 deletion datapacks.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"[markdown]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.formatOnSave": true
"editor.formatOnSave": true,
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true
},
"extensions": {
"recommendations": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scoreboard players set #has_loaded_once pause_day_cycle.dummy 1

# Giving this a value to start with means other datapacks can rely on this always existing
scoreboard players set #is_paused pause_day_cycle.dummy 0
scoreboard players set #is_paused pause_day_cycle.dummy 0

0 comments on commit 83ea472

Please sign in to comment.