-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/color_ping_block.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
execute if score @s ping_color matches 1..16 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] Glowing set value true | ||
|
||
execute if score @s ping_color matches 1 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:white_stained_glass" | ||
execute if score @s ping_color matches 2 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:light_gray_stained_glass" | ||
execute if score @s ping_color matches 3 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:gray_stained_glass" | ||
execute if score @s ping_color matches 4 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:black_stained_glass" | ||
execute if score @s ping_color matches 5 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:brown_stained_glass" | ||
execute if score @s ping_color matches 6 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:red_stained_glass" | ||
execute if score @s ping_color matches 7 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:orange_stained_glass" | ||
execute if score @s ping_color matches 8 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:yellow_stained_glass" | ||
execute if score @s ping_color matches 9 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:lime_stained_glass" | ||
execute if score @s ping_color matches 10 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:green_stained_glass" | ||
execute if score @s ping_color matches 11 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:cyan_stained_glass" | ||
execute if score @s ping_color matches 12 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:light_blue_stained_glass" | ||
execute if score @s ping_color matches 13 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:blue_stained_glass" | ||
execute if score @s ping_color matches 14 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:purple_stained_glass" | ||
execute if score @s ping_color matches 15 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:magenta_stained_glass" | ||
execute if score @s ping_color matches 16 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] block_state.Name set value "minecraft:pink_stained_glass" | ||
|
||
execute if score @s ping_color matches 1 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 16777215 | ||
execute if score @s ping_color matches 2 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 13882323 | ||
execute if score @s ping_color matches 3 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 8421504 | ||
execute if score @s ping_color matches 4 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 1315860 | ||
execute if score @s ping_color matches 5 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 9127187 | ||
execute if score @s ping_color matches 6 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 16711680 | ||
execute if score @s ping_color matches 7 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 16753920 | ||
execute if score @s ping_color matches 8 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 16776960 | ||
execute if score @s ping_color matches 9 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 12582656 | ||
execute if score @s ping_color matches 10 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 65280 | ||
execute if score @s ping_color matches 11 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 65535 | ||
execute if score @s ping_color matches 12 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 11393254 | ||
execute if score @s ping_color matches 13 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 255 | ||
execute if score @s ping_color matches 14 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 8388736 | ||
execute if score @s ping_color matches 15 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 16711935 | ||
execute if score @s ping_color matches 16 run data modify entity @e[tag=block_ping,sort=nearest,limit=1] glow_color_override set value 16761035 |
4 changes: 4 additions & 0 deletions
4
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/lifetime_watch.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
scoreboard players remove @e[tag=ping] ping_lifetime 1 | ||
kill @e[tag=block_ping,scores={ping_lifetime=..0}] | ||
|
||
execute if entity @e[tag=ping] run schedule function nincodedo:triggers/ping/lifetime_watch 1t |
25 changes: 25 additions & 0 deletions
25
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/load.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
scoreboard objectives add ping_lifetime dummy | ||
scoreboard objectives add ping_color dummy | ||
scoreboard objectives add raycast_steps dummy | ||
scoreboard objectives add ping trigger | ||
scoreboard objectives add ping_config trigger | ||
|
||
scoreboard players set config_ping_ping_lifetime rhcconfig 140 | ||
scoreboard players set max_raycast_steps rhcconfig 120 | ||
|
||
data modify storage nincodedo:storage colors append value "White" | ||
data modify storage nincodedo:storage colors append value "Light Gray" | ||
data modify storage nincodedo:storage colors append value "Gray" | ||
data modify storage nincodedo:storage colors append value "Black" | ||
data modify storage nincodedo:storage colors append value "Brown" | ||
data modify storage nincodedo:storage colors append value "Red" | ||
data modify storage nincodedo:storage colors append value "Orange" | ||
data modify storage nincodedo:storage colors append value "Yellow" | ||
data modify storage nincodedo:storage colors append value "Lime" | ||
data modify storage nincodedo:storage colors append value "Green" | ||
data modify storage nincodedo:storage colors append value "Cyan" | ||
data modify storage nincodedo:storage colors append value "Light Blue" | ||
data modify storage nincodedo:storage colors append value "Blue" | ||
data modify storage nincodedo:storage colors append value "Purple" | ||
data modify storage nincodedo:storage colors append value "Magenta" | ||
data modify storage nincodedo:storage colors append value "Pink" |
6 changes: 6 additions & 0 deletions
6
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/raycast.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
execute if score @s raycast_steps > max_raycast_steps rhcconfig run tag @s remove raycasting | ||
execute if entity @s[tag=!raycasting] run return 0 | ||
execute if entity @s[tag=raycasting] if block ~ ~ ~ minecraft:air unless entity @e[distance=..1.5,type=!minecraft:marker,type=!minecraft:interaction,tag=!raycasting] positioned ^ ^ ^0.5 run function nincodedo:triggers/ping/raycast | ||
execute if entity @s[tag=raycasting] unless block ~ ~ ~ minecraft:air run function nincodedo:triggers/ping/this_block | ||
execute if entity @s[tag=raycasting] if entity @e[distance=..1.5,type=!minecraft:marker,type=!minecraft:interaction,tag=!raycasting] run function nincodedo:triggers/ping/this_entity | ||
scoreboard players add @s raycast_steps 1 |
4 changes: 4 additions & 0 deletions
4
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/set_config.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
execute if score @s ping_config matches 1..16 store result score @s ping_color run scoreboard players get @s ping_config | ||
|
||
scoreboard players enable @s ping_config | ||
scoreboard players set @s ping_config -1 |
21 changes: 21 additions & 0 deletions
21
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/show_config.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
execute if score @s ping_color matches 1 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[0] | ||
execute if score @s ping_color matches 2 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[1] | ||
execute if score @s ping_color matches 3 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[2] | ||
execute if score @s ping_color matches 4 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[3] | ||
execute if score @s ping_color matches 5 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[4] | ||
execute if score @s ping_color matches 6 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[5] | ||
execute if score @s ping_color matches 7 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[6] | ||
execute if score @s ping_color matches 8 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[7] | ||
execute if score @s ping_color matches 9 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[8] | ||
execute if score @s ping_color matches 10 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[9] | ||
execute if score @s ping_color matches 11 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[10] | ||
execute if score @s ping_color matches 12 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[11] | ||
execute if score @s ping_color matches 13 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[12] | ||
execute if score @s ping_color matches 14 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[13] | ||
execute if score @s ping_color matches 15 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[14] | ||
execute if score @s ping_color matches 16 run data modify storage nincodedo:storage current_color set from storage nincodedo:storage colors[15] | ||
|
||
tellraw @s [{"text":"---Ping Color Config---\n"},{"text":"Click on a color to set your ping block's color.\n"},{"text":"Current ping color: "},{"nbt":"current_color","storage":"nincodedo:storage"},{"text":"\n"},{"text":"White","color":"white","clickEvent":{"action":"run_command","value":"/trigger ping_config set 1"}},{"text":" - "},{"text":"Light Gray","color":"#d3d3d3","clickEvent":{"action":"run_command","value":"/trigger ping_config set 2"}},{"text":" - "},{"text":"Gray","color":"#808080","clickEvent":{"action":"run_command","value":"/trigger ping_config set 3"}},{"text":" - "},{"text":"Black\n","color":"#161616","clickEvent":{"action":"run_command","value":"/trigger ping_config set 4"}},{"text":"Brown","color":"#a52a2a","clickEvent":{"action":"run_command","value":"/trigger ping_config set 5"}},{"text":" - "},{"text":"Red","color":"red","clickEvent":{"action":"run_command","value":"/trigger ping_config set 6"}},{"text":" - "},{"text":"Orange","color":"#ffa500","clickEvent":{"action":"run_command","value":"/trigger ping_config set 7"}},{"text":" - "},{"text":"Yellow\n","color":"yellow","clickEvent":{"action":"run_command","value":"/trigger ping_config set 8"}},{"text":"Lime","color":"green","clickEvent":{"action":"run_command","value":"/trigger ping_config set 9"}},{"text":" - "},{"text":"Green","color":"dark_green","clickEvent":{"action":"run_command","value":"/trigger ping_config set 10"}},{"text":" - "},{"text":"Cyan","color":"#1E817F","clickEvent":{"action":"run_command","value":"/trigger ping_config set 11"}},{"text":" - "},{"text":"Light Blue\n","color":"aqua","clickEvent":{"action":"run_command","value":"/trigger ping_config set 12"}},{"text":"Blue","color":"blue","clickEvent":{"action":"run_command","value":"/trigger ping_config set 13"}},{"text":" - "},{"text":"Purple","color":"dark_purple","clickEvent":{"action":"run_command","value":"/trigger ping_config set 14"}},{"text":" - "},{"text":"Magenta","color":"light_purple","clickEvent":{"action":"run_command","value":"/trigger ping_config set 15"}},{"text":" - "},{"text":"Pink","color":"#ffcccc"}] | ||
|
||
scoreboard players enable @s ping_config | ||
scoreboard players set @s ping_config -1 |
5 changes: 5 additions & 0 deletions
5
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/start_ping.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
scoreboard players reset @s ping | ||
scoreboard players enable @s ping | ||
scoreboard players reset @s raycast_steps | ||
tag @s add raycasting | ||
execute anchored eyes positioned ^ ^ ^1 run function nincodedo:triggers/ping/raycast |
8 changes: 8 additions & 0 deletions
8
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/this_block.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tag @s remove raycasting | ||
execute align xyz run summon minecraft:block_display ~ ~ ~ {Glowing:true,block_state:{Name:"minecraft:light_gray_stained_glass"},Tags:["block_ping","ping"]} | ||
function nincodedo:triggers/ping/color_ping_block | ||
data modify entity @e[tag=ping,sort=nearest,limit=1] transformation.scale set value [0.98f,0.98f,0.98f] | ||
execute as @e[tag=ping,sort=nearest,limit=1] at @s run tp ~0.01 ~0.01 ~0.01 | ||
playsound minecraft:entity.player.levelup player @a ~ ~ ~ 1 2 | ||
execute as @e[tag=ping,sort=nearest,limit=1] store result score @s ping_lifetime run scoreboard players get config_ping_ping_lifetime rhcconfig | ||
schedule function nincodedo:triggers/ping/lifetime_watch 1t |
4 changes: 4 additions & 0 deletions
4
datapacks/ocw-stuff/data/nincodedo/functions/triggers/ping/this_entity.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
effect give @e[distance=..1.5,type=!minecraft:marker,type=!minecraft:interaction,tag=!raycasting] glowing 10 0 true | ||
playsound minecraft:entity.player.levelup player @a ~ ~ ~ 1 2 | ||
|
||
tag @s remove raycasting |
2 changes: 2 additions & 0 deletions
2
datapacks/ocw-stuff/data/nincodedo/functions/util/setup_new_player.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Trigger Commands | ||
|
||
## bannerplz | ||
|
||
Using `/trigger bannerplz` when at certain structure locations will give the player a banner. The banner is intended to be placed at the structure and used for maps. This trigger has a 2 minute cooldown. | ||
|
||
## day1tooltime | ||
|
||
Using `/trigger day1tooltime` will show you how much time you have left on your Day 1 tools. This trigger is only available if you have remaining Day 1 tool time. | ||
|
||
## ping | ||
|
||
Using `/trigger ping` will highlight the block or entity you're looking at to notify other players. | ||
|
||
### ping_config | ||
|
||
As part of `/trigger ping`, you can also use `/trigger ping_config` to change your ping's block color. |