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

0 commit comments

Comments
 (0)