Skip to content

Commit 25c8d27

Browse files
authored
Merge pull request #63 from Tschipcraft/dev
v1.8.4
2 parents fce57e3 + 3bd2b7c commit 25c8d27

File tree

61 files changed

+382
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+382
-44
lines changed

.github/workflows/cd.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ on:
99
mc_version:
1010
description: 'Minecraft version(s) the data pack runs in (human readable)'
1111
required: true
12-
default: '1.17x-1.20x'
12+
default: '1.17x-1.21x'
1313
mc_version_range:
1414
description: 'Minecraft version(s) the data pack runs in (encoded in version range spec)'
1515
required: true
16-
default: '>=1.17 <=1.20.4'
16+
default: '>=1.17 <=1.21'
1717

1818
jobs:
1919
deploy:
@@ -91,11 +91,12 @@ jobs:
9191
modrinth-id: 7YjclEGc
9292
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
9393
game-versions: ${{ github.event.inputs.mc_version_range }}
94+
game-version-filter: any
9495
fail-mode: skip
9596

9697
name: "[DP] Release v${{ github.event.inputs.tag }}"
9798
version: ${{ github.event.inputs.tag }}
98-
changelog-file: CHANGES.*
99+
changelog-file: CHANGES.md
99100

100101
loaders: |
101102
datapack
@@ -109,11 +110,12 @@ jobs:
109110
modrinth-id: 7YjclEGc
110111
modrinth-token: ${{ secrets.MODRINTH_TOKEN }}
111112
game-versions: ${{ github.event.inputs.mc_version_range }}
113+
game-version-filter: any
112114
fail-mode: skip
113115

114116
name: "[Mod] Release v${{ github.event.inputs.tag }}"
115117
version: ${{ github.event.inputs.tag }}+mod
116-
changelog-file: CHANGES.*
118+
changelog-file: CHANGES.md
117119

118120
dependencies: |
119121
fabric-api(optional){modrinth:P7dR8mSH}
@@ -134,11 +136,12 @@ jobs:
134136
curseforge-id: 831385
135137
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
136138
game-versions: ${{ github.event.inputs.mc_version_range }}
139+
game-version-filter: any
137140
fail-mode: skip
138141

139142
name: "Release v${{ github.event.inputs.tag }}"
140143
version: ${{ github.event.inputs.tag }}
141-
changelog-file: CHANGES.*
144+
changelog-file: CHANGES.md
142145

143146
loaders: |
144147
datapack
@@ -152,17 +155,19 @@ jobs:
152155
curseforge-id: 910095
153156
curseforge-token: ${{ secrets.CURSEFORGE_TOKEN }}
154157
game-versions: ${{ github.event.inputs.mc_version_range }}
158+
game-version-filter: any
155159
fail-mode: skip
156160

157161
name: "Release v${{ github.event.inputs.tag }}"
158162
version: ${{ github.event.inputs.tag }}+mod
159-
changelog-file: CHANGES.*
163+
changelog-file: CHANGES.md
160164

161165
dependencies: |
162166
catalogue(optional){curseforge:459701}
163167
catalogue-fabric(optional){curseforge:667377}
164168
midnightlib(optional){curseforge:488090}
165169
java: |
170+
Java 21
166171
Java 17
167172
Java 18
168173
loaders: |

.github/workflows/test_workflow.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ on:
99
mc_version:
1010
description: 'Minecraft version(s) the data pack runs in (human readable)'
1111
required: true
12-
default: '1.17x-1.20x'
12+
default: '1.17x-1.21x'
1313
mc_version_range:
1414
description: 'Minecraft version(s) the data pack runs in (encoded in version range spec)'
1515
required: true
16-
default: '>=1.17 <=1.20.4'
16+
default: '>=1.17 <=1.21'
1717

1818
jobs:
1919
deploy:

.spyglassrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"env": {
3+
"gameVersion": "1.21"
4+
},
5+
"lint": {
6+
"idOmitDefaultNamespace": ["warning", false],
7+
"nbtTypeCheck": ["warning", "strictly"]
8+
}
9+
}

CHANGES.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
- **Support for Minecraft 1.21** ⚔️ (closes [#29](https://github.com/Tschipcraft/dynamiclights/issues/29), [#41](https://github.com/Tschipcraft/dynamiclights/issues/41), [#42](https://github.com/Tschipcraft/dynamiclights/issues/42), [#44](https://github.com/Tschipcraft/dynamiclights/issues/44))
2-
- Copied the contents of the legacy folders to their new names and removed unused code
3-
- Used new enchantment check format in predicates
4-
- Updated menu trigger to use advancements instead and added menu message header
5-
- Fixed performance overlay for Minecraft 1.20.2+ not having an effect
6-
- Updated LICENSE
1+
- **Added support for Minecraft 1.21.3** 💰
2+
- **Added Curios API and Curios API Continuation support** (closes [#52](https://github.com/Tschipcraft/dynamiclights/issues/52))
3+
- **Added global and per-player toggle for Dynamic Lights** (closes [#56](https://github.com/Tschipcraft/dynamiclights/issues/56), closes [#37](https://github.com/Tschipcraft/dynamiclights/issues/37), closes [#26](https://github.com/Tschipcraft/dynamiclights/issues/26), closes [#47](https://github.com/Tschipcraft/dynamiclights/issues/47))
4+
- Added mod support for Lucky's Wardrobe
5+
- Fixed ominous item spawners not being parsed for light emitting items
6+
- Fixed Dynamic Lights breaking after some time on paper servers (closes [#45](https://github.com/Tschipcraft/dynamiclights/issues/45), closes [#21](https://github.com/Tschipcraft/dynamiclights/issues/21))
7+
- Fixed tschipcraft.menu trigger not being enabled in 1.21+

assets/dynamiclights/lang/en_us.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"dynamiclights.midnightconfig.empty3": "",
1313
"dynamiclights.midnightconfig.other": "§lOther",
1414

15+
"dynamiclights.midnightconfig.enable": "Dynamic Lights",
16+
"dynamiclights.midnightconfig.enable.tooltip": "Enable Dynamic Lights\nDefault: §aYes§f",
1517
"dynamiclights.midnightconfig.enable_on_fire": "Burning entities",
1618
"dynamiclights.midnightconfig.enable_on_fire.tooltip": "Default: §aYes§f",
1719
"dynamiclights.midnightconfig.enable_glowing": "Entities with the glowing potion effect",
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"criteria": {
3+
"trigger_menu": {
4+
"trigger": "minecraft:tick",
5+
"conditions": {
6+
"player": [
7+
{
8+
"condition": "minecraft:entity_scores",
9+
"entity": "this",
10+
"scores": {
11+
"ts.dl.toggle": {
12+
"min": 1
13+
}
14+
}
15+
}
16+
]
17+
}
18+
}
19+
},
20+
"rewards": {
21+
"function": "dynamiclights:settings/toggle_enable_player"
22+
}
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"criteria": {
3+
"trigger_menu": {
4+
"trigger": "minecraft:tick",
5+
"conditions": {
6+
"player": [
7+
{
8+
"condition": "minecraft:entity_scores",
9+
"entity": "this",
10+
"scores": {
11+
"ts.dl.toggle": {
12+
"min": 1
13+
}
14+
}
15+
}
16+
]
17+
}
18+
}
19+
},
20+
"rewards": {
21+
"function": "dynamiclights:settings/toggle_enable_player"
22+
}
23+
}

data/dynamiclights/function/install.mcfunction

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ scoreboard objectives add ts.dl.temp dummy
4242
scoreboard objectives add ts.dl.settings dummy
4343

4444
# defaults
45+
execute unless score $enable ts.dl.settings matches -1..2 run scoreboard players set $enable ts.dl.settings 1
4546
execute unless score $enable_on_fire ts.dl.settings matches -1..2 run scoreboard players set $enable_on_fire ts.dl.settings 1
4647
execute unless score $enable_glowing ts.dl.settings matches -1..2 run scoreboard players set $enable_glowing ts.dl.settings 0
4748
execute unless score $fire_aspect ts.dl.settings matches -1..2 run scoreboard players set $fire_aspect ts.dl.settings 1
@@ -59,15 +60,20 @@ execute unless score $rain_sensitive ts.dl.settings matches -1..2 run scoreboard
5960
execute unless score $unlimited ts.dl.settings matches -1..2 run scoreboard players set $unlimited ts.dl.settings 0
6061

6162
scoreboard objectives add tschipcraft.menu trigger
63+
scoreboard objectives add ts.dl.toggle trigger
64+
scoreboard players enable @a tschipcraft.menu
65+
scoreboard players enable @a ts.dl.toggle
6266

6367
scoreboard objectives add tvc_ignore dummy
6468

6569
## Set load status
6670
# 18 for v1.8
6771
scoreboard players set dynamiclights load.status 18
6872

69-
# Reset advancement
73+
# Reset advancements
7074
advancement revoke @a only tschipcraft:menu
75+
advancement revoke @a only dynamiclights:toggle_enable
7176

72-
## Schedule main function
77+
## Schedule main and loop function
7378
schedule function dynamiclights:internal/main 5t
79+
schedule function dynamiclights:internal/loop 10s
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##by Tschipcraft
2+
# Loop to ensure all new players can run the triggers
3+
4+
schedule function dynamiclights:internal/loop 4s
5+
6+
scoreboard players enable @a ts.dl.toggle
7+
scoreboard players enable @a tschipcraft.menu
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
## by Tschipcraft
1+
##by Tschipcraft
2+
3+
# Schedule for next tick
4+
schedule function dynamiclights:internal/main 1t
25

36
# Tag old lights
47
tag @e[type=minecraft:marker,tag=ts.dl.light] add ts.dl.remove
@@ -7,10 +10,7 @@ tag @e[type=minecraft:marker,tag=ts.dl.light] add ts.dl.remove
710
execute as @e[type=minecraft:tnt] at @s run function dynamiclights:internal/explosion_detection/tnt
811

912
# Core
10-
execute unless score $global ts.dl.tnt.fuse matches 1 as @e[type=!#dynamiclights:dyn_ignore,tag=!smithed.strict,tag=!global.ignore,tag=!global.ignore.gui] unless entity @s[type=minecraft:player,gamemode=spectator] at @s run function dynamiclights:internal/main_exec
13+
execute if score $enable ts.dl.settings matches 1..2 unless score $global ts.dl.tnt.fuse matches 1 as @e[type=!#dynamiclights:dyn_ignore,tag=!smithed.strict,tag=!global.ignore,tag=!global.ignore.gui,tag=!ts.dl.ignore] unless entity @s[type=minecraft:player,gamemode=spectator] at @s run function dynamiclights:internal/main_exec
1114

1215
# Clear old lights
1316
execute as @e[type=minecraft:marker,tag=ts.dl.remove] at @s run function dynamiclights:internal/remove_light
14-
15-
# Repeat
16-
schedule function dynamiclights:internal/main 1t

data/dynamiclights/function/internal/sources/core.mcfunction

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
# Dispatches dynamic light around the world
33
# @s - entity that may emit light
44

5+
# Curios Compatibility
6+
execute if score $curios_install ts.dl.version matches 1 if data entity @s ForgeCaps.curios:inventory.Curios[0] run function dynamiclights:internal/sources/mod_support/curios/trigger_forge
7+
execute if score $curios_install ts.dl.version matches 1 if data entity @s neoforge:attachments.curios:inventory.Curios[0] run function dynamiclights:internal/sources/mod_support/curios/trigger_neoforge
8+
59
# These entities use a different NBT tag for storing the item and need special parsing (since 24w11a these are only falling blocks and block displays)
610
execute as @s[type=#dynamiclights:parse] unless score @s ts.dl.i.type matches 0..15 run function dynamiclights:internal/sources/parse/main
711

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##by Tschipcraft
2+
# Iterates over all items in the current stack
3+
4+
# Check if item renders
5+
execute store result score curios.render ts.dl.temp run data get storage dynamiclights:curios stacks[0].StacksHandler.Renders.Renders[0].Render
6+
7+
# Parse item and advance to next
8+
execute if score curios.render ts.dl.temp matches 1 run function dynamiclights:internal/sources/mod_support/curios/parse
9+
data remove storage dynamiclights:curios stacks[0].StacksHandler.Stacks.Items[0]
10+
data remove storage dynamiclights:curios stacks[0].StacksHandler.Renders.Renders[0]
11+
12+
execute if data storage dynamiclights:curios stacks[0].StacksHandler.Stacks.Items[0] run function dynamiclights:internal/sources/mod_support/curios/iterate_items
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##by Tschipcraft
2+
3+
# Iterate over all stacks added by Curios
4+
execute if data storage dynamiclights:curios stacks[0].StacksHandler.Stacks.Items[0] run function dynamiclights:internal/sources/mod_support/curios/iterate_items
5+
data remove storage dynamiclights:curios stacks[0]
6+
7+
execute if data storage dynamiclights:curios stacks[0] run function dynamiclights:internal/sources/mod_support/curios/iterate_stacks
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##by Tschipcraft
2+
3+
# Reset scores from previous tick
4+
scoreboard players reset @s ts.dl.i.type
5+
scoreboard players reset @s ts.dl.i.is_ench
6+
scoreboard players reset @s ts.dl.i.is_ameth
7+
scoreboard players reset @s ts.dl.i.is_firea
8+
scoreboard players reset @s ts.dl.i.is_ript
9+
scoreboard players reset @s ts.dl.i.is_chann
10+
11+
# Call iterated stack function
12+
function dynamiclights:internal/sources/mod_support/curios/iterate_stacks
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
##by Tschipcraft
2+
3+
summon armor_stand ~ ~ ~ {UUID:[I;-1030365714,1276464731,-2084950084,-395075115],NoGravity:1b,Silent:1b,Invulnerable:1b,Small:1b,Marker:1b,Invisible:1b,NoBasePlate:1b,Tags:["ts.dl.i.parser"],HandItems:[{id:"minecraft:structure_void",Count:1b},{}],DisabledSlots:4144959}
4+
5+
# Copy NBT data
6+
data modify entity c295ddee-4c15-4e5b-83ba-2fbce873a1d5 HandItems[0] set from storage dynamiclights:curios stacks[0].StacksHandler.Stacks.Items[0]
7+
data modify entity c295ddee-4c15-4e5b-83ba-2fbce873a1d5 HandItems[1] set from storage dynamiclights:curios stacks[0].StacksHandler.Cosmetics.Items[0]
8+
9+
execute as c295ddee-4c15-4e5b-83ba-2fbce873a1d5 run function dynamiclights:internal/sources/parse/main_exec
10+
11+
# Transfer scores
12+
scoreboard players operation @s ts.dl.i.type = .global ts.dl.i.type
13+
scoreboard players operation @s ts.dl.i.is_ench = .global ts.dl.i.is_ench
14+
scoreboard players operation @s ts.dl.i.is_ameth = .global ts.dl.i.is_ameth
15+
scoreboard players operation @s ts.dl.i.is_firea = .global ts.dl.i.is_firea
16+
scoreboard players operation @s ts.dl.i.is_ript = .global ts.dl.i.is_ript
17+
scoreboard players operation @s ts.dl.i.is_chann = .global ts.dl.i.is_chann
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##by Tschipcraft
2+
3+
# Copy to cache
4+
data modify storage dynamiclights:curios stacks set from entity @s ForgeCaps.curios:inventory.Curios
5+
6+
# Call main
7+
function dynamiclights:internal/sources/mod_support/curios/main
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
##by Tschipcraft
2+
3+
# Copy to cache
4+
data modify storage dynamiclights:curios stacks set from entity @s neoforge:attachments.curios:inventory.Curios
5+
6+
# Call main
7+
function dynamiclights:internal/sources/mod_support/curios/main

data/dynamiclights/function/internal/sources/parse/main.mcfunction

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ summon armor_stand ~ ~ ~ {UUID:[I;-1030365714,1276464731,-2084950084,-395075115]
55
# Copy NBT data
66
execute as @s[type=minecraft:falling_block] run data modify entity c295ddee-4c15-4e5b-83ba-2fbce873a1d5 HandItems[0].id set from entity @s BlockState.Name
77
execute as @s[type=minecraft:block_display] run data modify entity c295ddee-4c15-4e5b-83ba-2fbce873a1d5 HandItems[0].id set from entity @s block_state.Name
8+
execute as @s[type=minecraft:ominous_item_spawner] run data modify entity c295ddee-4c15-4e5b-83ba-2fbce873a1d5 HandItems[0] set from entity @s item
89

910
execute as c295ddee-4c15-4e5b-83ba-2fbce873a1d5 run function dynamiclights:internal/sources/parse/main_exec
1011

data/dynamiclights/function/internal/version_checker/start.mcfunction

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
scoreboard objectives add ts.dl.version dummy
44
execute store result score $global ts.dl.version run data get entity @r DataVersion
5-
execute unless score $global tvc_ignore matches 1 if score $global ts.dl.version matches 4000.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","clickEvent":{"action":"run_command","value":"/trigger tschipcraft.menu"},"hoverEvent":{"action":"show_text","contents":"Click here"}},{"text":")","color":"gold"}]
5+
execute unless score $global tvc_ignore matches 1 if score $global ts.dl.version matches 4100.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Future unknown Minecraft version above 1.21.3 detected! This data pack/mod may not work correctly anymore! Please make sure to check for updates in the menu! (","color":"gold"},{"text":"/trigger tschipcraft.menu","underlined":true,"color":"gold","clickEvent":{"action":"run_command","value":"/trigger tschipcraft.menu"},"hoverEvent":{"action":"show_text","contents":"Click here"}},{"text":")","color":"gold"}]
6+
# Note: 1.17x-1.20x uses the old folder names (function -> functions)
7+
8+
# Curios Compatibility
9+
scoreboard players reset $curios_install ts.dl.version
10+
execute if data entity @r ForgeCaps.curios:inventory.Curios run scoreboard players set $curios_install ts.dl.version 1
11+
execute if data entity @r neoforge:attachments.curios:inventory.Curios run scoreboard players set $curios_install ts.dl.version 1
612

713
execute unless score $global ts.dl.version matches 1.. run function dynamiclights:internal/version_checker/retry

data/dynamiclights/function/reset.mcfunction

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,15 @@ kill @e[type=minecraft:armor_stand,tag=ts.dl.i.parser]
88
# Reset explosion alarm
99
function dynamiclights:internal/explosion_detection/reset
1010

11-
# Reset advancement
11+
# Reset advancements
1212
advancement revoke @a only tschipcraft:menu
13+
scoreboard players enable @a tschipcraft.menu
14+
advancement revoke @a only dynamiclights:toggle_enable
15+
scoreboard players enable @a ts.dl.toggle
16+
17+
# Reset parsed data
18+
scoreboard objectives remove ts.dl.i.type
19+
scoreboard objectives add ts.dl.i.type dummy
1320

1421
# Reschedule main function
1522
schedule function dynamiclights:internal/main 5t

data/dynamiclights/function/settings/core.mcfunction

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
tellraw @s {"text":"\n=-=Dynamic Lights Settings=-=","bold":true,"color":"dark_green"}
44

5+
execute if score $enable ts.dl.settings matches 1 run tellraw @s [{"text":"[✔] ","bold":true,"color":"green","hoverEvent":{"action":"show_text","contents":[{"text":"Click here to toggle Dynamic Lights "},{"text":"off","color":"red"},{"text":"."}]},"clickEvent":{"action":"run_command","value":"/function dynamiclights:settings/toggle_enable_global"}},{"text":"Enable Dynamic Lights","color":"white"}]
6+
execute if score $enable ts.dl.settings matches 0 run tellraw @s [{"text":"[❌] ","bold":true,"color": "red","hoverEvent":{"action":"show_text","contents":[{"text":"Click here to toggle Dynamic Lights "},{"text":"on","color":"green"},{"text":"."}]},"clickEvent":{"action":"run_command","value":"/function dynamiclights:settings/toggle_enable_global"}},{"text":"Enable Dynamic Lights","color":"white"}]
7+
execute if score $enable ts.dl.settings matches -1 run tellraw @s [{"text":"[❌] Enable Dynamic Lights","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
8+
execute if score $enable ts.dl.settings matches 2 run tellraw @s [{"text":"[✔] Enable Dynamic Lights","bold":false,"color":"gray","hoverEvent":{"action":"show_text","contents":[{"text":"This setting is getting controlled globally and can't be changed here."}]}}]
9+
execute if score $enable ts.dl.settings matches -1..0 run tellraw @s {"text":"-- \u26a0 Dynamic Lights disabled \u26a0 --","color":"red","hoverEvent":{"action":"show_text","contents":[{"text":"Click here to toggle Dynamic Lights "},{"text":"on","color":"green"},{"text":"."}]},"clickEvent":{"action":"run_command","value":"/function dynamiclights:settings/toggle_enable_global"}}
10+
11+
execute as @s[tag=!ts.dl.ignore] run tellraw @s [{"text":"[✔] ","bold":true,"color":"green","hoverEvent":{"action":"show_text","contents":[{"text":"Click here to toggle Dynamic Lights "},{"text":"off","color":"red"},{"text":" for "},{"selector": "@s"},{"text": "."}]},"clickEvent":{"action":"run_command","value":"/trigger ts.dl.toggle"}},{"text":"Enable Dynamic Lights for yourself","color":"white"}]
12+
execute as @s[tag=ts.dl.ignore] run tellraw @s [{"text":"[❌] ","bold":true,"color": "red","hoverEvent":{"action":"show_text","contents":[{"text":"Click here to toggle Dynamic Lights "},{"text":"on","color":"green"},{"text":" for "},{"selector": "@s"},{"text": "."}]},"clickEvent":{"action":"run_command","value":"/trigger ts.dl.toggle"}},{"text":"Enable Dynamic Lights for yourself","color":"white"}]
13+
514
tellraw @s {"text":"\nEnable light emitting from...","bold":true,"color":"white"}
615

716
execute if score $enable_on_fire ts.dl.settings matches 1 run tellraw @s [{"text":"[✔] ","bold":true,"color":"green","hoverEvent":{"action":"show_text","contents":[{"text":"Click here to toggle this feature "},{"text":"off","color":"red"},{"text":"."}]},"clickEvent":{"action":"run_command","value":"/function dynamiclights:settings/toggle_on_fire"}},{"text":"Burning entities","color":"white"}]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
##by Tschipcraft
2+
3+
execute if score $enable ts.dl.settings matches 1 run tellraw @s ["",{"text":"\n-> Disabled "},{"text":"Dynamic Lights globally","color":"yellow"}]
4+
execute if score $enable ts.dl.settings matches 0 run tellraw @s ["",{"text":"\n-> Enabled "},{"text":"Dynamic Lights globally","color":"yellow"}]
5+
6+
scoreboard players add $enable ts.dl.settings 1
7+
execute if score $enable ts.dl.settings matches 2 run scoreboard players set $enable ts.dl.settings 0
8+
function dynamiclights:settings

0 commit comments

Comments
 (0)