Skip to content

Commit

Permalink
Support for Snapshot 24w18a
Browse files Browse the repository at this point in the history
- Updated to work with Snapshot 24w18a using adjusted overlays
- Fixed performance overlay for Minecraft 1.20.2+ not having an effect
- Updated GitHub workflow to exclude rather than include folders
  • Loading branch information
Tschipcraft committed Jul 4, 2024
1 parent 3507768 commit 2ea659d
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 47 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ jobs:
uses: montudor/action-zip@v1
if: steps.check_datapack_folder.outputs.files_exists == 'true'
with:
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" -r data overlay_16 overlay_33 overlay_35 overlay_disable_trim pack.mcmeta pack.png LICENSE README.md
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" -r . -x assets net src META-INF fabric.mod.json unused wiki CHANGELOG.md ".*"
- name: Create mod jar file
uses: montudor/action-zip@v1
if: steps.check_mod_folder.outputs.files_exists == 'true'
with:
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar" -r data overlay_16 overlay_33 overlay_35 overlay_disable_trim assets META-INF net fabric.mod.json pack.mcmeta pack.png LICENSE README.md
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar" -r . -x unused wiki CHANGELOG.md ".*"
- name: Create asset pack zip file
uses: montudor/action-zip@v1
if: steps.check_assets_folder.outputs.files_exists == 'true'
with:
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip" -r assets overlay_16 overlay_33 overlay_35 overlay_disable_trim pack.mcmeta pack.png LICENSE README.md
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip" -r . -x net src META-INF fabric.mod.json unused wiki CHANGELOG.md ".*"

# Upload
- name: Upload data pack version to Modrinth
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Continuous Deployment (Test)
name: Continuous Deployment (Build)
on:
workflow_dispatch:
inputs:
Expand Down Expand Up @@ -71,17 +71,17 @@ jobs:
uses: montudor/action-zip@v1
if: steps.check_datapack_folder.outputs.files_exists == 'true'
with:
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" -r data overlay_16 overlay_33 overlay_35 overlay_disable_trim pack.mcmeta pack.png LICENSE README.md
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" -r . -x assets net src META-INF fabric.mod.json unused wiki CHANGELOG.md ".*"
- name: Create mod jar file
uses: montudor/action-zip@v1
if: steps.check_mod_folder.outputs.files_exists == 'true'
with:
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar" -r data overlay_16 overlay_33 overlay_35 overlay_disable_trim assets META-INF net fabric.mod.json pack.mcmeta pack.png LICENSE README.md
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar" -r . -x unused wiki CHANGELOG.md ".*"
- name: Create asset pack zip file
uses: montudor/action-zip@v1
if: steps.check_assets_folder.outputs.files_exists == 'true'
with:
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip" -r assets overlay_16 overlay_33 overlay_35 overlay_disable_trim pack.mcmeta pack.png LICENSE README.md
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip" -r . -x net src META-INF fabric.mod.json unused wiki CHANGELOG.md ".*"

# Upload
- name: Capture datapack build artifact
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/unused
35 changes: 2 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,2 @@
Hotfix for v1.8 - the data pack now actually includes the overlays for compatibility with 1.20.6 (closes [#34](https://github.com/Tschipcraft/dynamiclights/issues/34))

- **Update to Minecraft 1.20.6 🐺**
These changes utilize overlays to maintain backwards compatibility
- Switched to testing components rather than NBT in predicates
- Added support for the newly added contents slot in predicates
- **Added intermediate light levels 3 and 12** ([#14](https://github.com/Tschipcraft/dynamiclights/issues/14))
- Magma cubes, magma blocks, magma cream, all remaining amethyst buds, heart of the sea and totem of undying (closes [#23](https://github.com/Tschipcraft/dynamiclights/issues/23)) now emit light level 3
- Dragon fireballs now emit light level 12 instead of 15
- **Implemented a new system for finding valid locations for dynamic lights.**
Checks now actively avoid blocking paths of fluids and pistons (closes [#15](https://github.com/Tschipcraft/dynamiclights/issues/15)), interfering with other redstone components and triggering certain block updates (closes [#12](https://github.com/Tschipcraft/dynamiclights/issues/12))
- **Added support for parsing item displays, block displays and falling blocks**
- **Added support for parsing tridents, arrows and ominous item spawners in versions 1.20.5 and up**
- Simplified light block placement and removal
- Fixed shulkers teleporting away when shooting (closes [#20](https://github.com/Tschipcraft/dynamiclights/issues/20))
- Eventified item frame reparsing in versions before 1.20.5
Item frame reparsing is now triggered when a player right-clicks on an item frame or when an item drops nearby in versions prior to 24w11a
This should improve performance in regions with a high number of item frames while also improving responsiveness (first steps for [#13](https://github.com/Tschipcraft/dynamiclights/issues/13))
- Improved dynamic light explosion avoidance performance by checking a global score instead of scanning for nearby area effect clouds
- Fixed dynamic lights overwriting cave_air with air
- Fixed dynamic light position offset for item entities
- Added separate mod support tag lists for modded items
- Added additional overlay that should slightly improve performance when placing dynamic lights in 1.20.2 and above
- Gave dynamic light marker entities a custom name ([#19](https://github.com/Tschipcraft/dynamiclights/issues/19))
- Some light level changes
- Added conduit to light level 15 items
- Moved glowstone dust from light level 15 to light level 9
- Added crying obsidian to light level 9 items
- Added small_fireball to light level 9 entities
- Moved allay from 9 to light level 6 entities
- Added enchanted golden apple, enchanting table, enchanted book, sculk catalyst and the upcoming vault to light level 6 items
- Added paintings to the ignore tag list
- Added tnt minecarts to the may_block_explosion_damage tag list
- **Update to Minecraft 1.21**
- Fixed performance overlay for Minecraft 1.20.2+ not having an effect
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

scoreboard objectives add ts.dl.version dummy
execute store result score $global ts.dl.version run data get entity @r DataVersion
execute if score $global ts.dl.version matches 3900.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"\u26a0 Minecraft version ","color":"red"},{"text":"1.21 or above","color":"red","bold":true},{"text":" detected! This version of the data pack does not work in 1.21+! Please use a newer version.","color":"red"}]
#execute if score $global ts.dl.version matches 3900.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"\u26a0 Minecraft version ","color":"red"},{"text":"1.21 or above","color":"red","bold":true},{"text":" detected! This version of the data pack does not work in 1.21+! Please use a newer version.","color":"red"}]
#execute unless score $global tvc_ignore matches 1 if score $global ts.dl.version matches 3900.. run tellraw @a [{"text":"[Dynamic Lights] ","color":"gray"},{"text":"?","bold":true,"color":"gold"},{"text":" Minecraft version 1.20.6 or above 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"}]
#execute if score $global ts.dl.version matches 2976..3106 run say 1.19 detected!
#execute if score $global ts.dl.version matches 2731..2975 run say 1.18 detected!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

data merge entity @s {Tags:["ts.dl.light","global.ignore","global.ignore.kill","global.ignore.pos","smithed.block"],Invulnerable:1b,Silent:1b,CustomName:'{"text":"Dynamic Light [12]"}'}

function dynamiclights:internal/place_light/6/update
function dynamiclights:internal/place_light/12/update
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

data merge entity @s {Tags:["ts.dl.light","global.ignore","global.ignore.kill","global.ignore.pos","smithed.block"],Invulnerable:1b,Silent:1b,CustomName:'{"text":"Dynamic Light [9]"}'}

function dynamiclights:internal/place_light/6/update
function dynamiclights:internal/place_light/9/update
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[
{
"//comment": "This predicate returns false, if the tested entity is holding a with channeling enchanted trident",
"//version": "enchantments alongside enchantment is included for 24w18a-24w21a",
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
Expand All @@ -18,6 +19,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:channeling",
"enchantments": "minecraft:channeling",
"levels": {
"min": 1
}
Expand Down Expand Up @@ -47,6 +49,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:channeling",
"enchantments": "minecraft:channeling",
"levels": {
"min": 1
}
Expand Down Expand Up @@ -77,6 +80,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:channeling",
"enchantments": "minecraft:channeling",
"levels": {
"min": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[
{
"//comment": "This predicate returns false, if the tested entity is holding any fire aspect enchanted items",
"//version": "enchantments alongside enchantment is included for 24w18a-24w21a",
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
Expand All @@ -15,6 +16,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:fire_aspect",
"enchantments": "minecraft:fire_aspect",
"levels": {
"min": 1
}
Expand All @@ -41,6 +43,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:fire_aspect",
"enchantments": "minecraft:fire_aspect",
"levels": {
"min": 1
}
Expand Down Expand Up @@ -68,6 +71,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:fire_aspect",
"enchantments": "minecraft:fire_aspect",
"levels": {
"min": 1
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[
{
"//comment": "This predicate returns false, if the tested entity is holding a with riptide enchanted trident",
"//version": "enchantments alongside enchantment is included for 24w18a-24w21a",
"condition": "minecraft:inverted",
"term": {
"condition": "minecraft:entity_properties",
Expand All @@ -18,6 +19,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:riptide",
"enchantments": "minecraft:riptide",
"levels": {
"min": 1
}
Expand Down Expand Up @@ -47,6 +49,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:riptide",
"enchantments": "minecraft:riptide",
"levels": {
"min": 1
}
Expand Down Expand Up @@ -77,6 +80,7 @@
"minecraft:enchantments": [
{
"enchantment": "minecraft:riptide",
"enchantments": "minecraft:riptide",
"levels": {
"min": 1
}
Expand Down
8 changes: 4 additions & 4 deletions pack.mcmeta
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
"id": "dynamiclights",
"pack": {
"pack_format": 15,
"supported_formats": [7,41],
"supported_formats": [7,45],
"description": "Tschipcraft's Dynamic Lights \n└ v${version} ● mc${mc_version}"
},
"overlays": {
"entries": [
{
"formats": [16,99],
"formats": [16,44],
"directory": "overlay_16"
},
{
"formats": [33,99],
"formats": [33,44],
"directory": "overlay_33"
},
{
"formats": [35,99],
"formats": [35,44],
"directory": "overlay_35"
},
{
Expand Down

0 comments on commit 2ea659d

Please sign in to comment.