Skip to content

Commit

Permalink
Data Command Helper
Browse files Browse the repository at this point in the history
  • Loading branch information
DinnerBeef committed Oct 11, 2024
1 parent 74fd116 commit f163892
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion data/lt/function/world_games/minigolf/core/test.mcfunction

This file was deleted.

1 change: 1 addition & 0 deletions data/lt/function/world_games/minigolf/data.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$data modify block ~ ~-1 ~ name set value "lt:golf/$(year)/hole_$(hole)"
2 changes: 2 additions & 0 deletions data/lt/function/world_games/minigolf/set_defualt.mcfunction
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute store result storage golf hole int 1 run scoreboard players set @s golf.global 0
execute store result storage golf year int 1 run scoreboard players set @s golf.timer 2022
10 changes: 5 additions & 5 deletions data/lt/function/world_games/minigolf/test.mcfunction
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
setblock ~ ~ ~ stone
setblock ~7 ~ ~ stone
setblock ~ ~ ~7 stone
setblock ~-7 ~ ~ stone
setblock ~ ~ ~-7 stone
execute store result storage golf hole int 1 run scoreboard players add @s golf.global 1
execute as @s at @s run function lt:world_games/minigolf/data with storage minecraft:golf
execute if score @s golf.global matches 18.. run say hi
execute if score @s golf.global matches 18.. store result storage golf year int 1 run scoreboard players add @s golf.timer 1
execute if score @s golf.global matches 18.. run scoreboard players set @s golf.global 0

0 comments on commit f163892

Please sign in to comment.