Skip to content

Commit

Permalink
Final changes for v1.8.3
Browse files Browse the repository at this point in the history
- Removed unused legacy code for 1.21+ (#29)
- Added menu message header for 1.21+
- Updated menu trigger to use advancements instead for 1.21+
- Updated README
- Updated LICENSE
  • Loading branch information
Tschipcraft committed Jul 10, 2024
1 parent 6a600f9 commit 96a4df7
Show file tree
Hide file tree
Showing 27 changed files with 86 additions and 121 deletions.
18 changes: 9 additions & 9 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 . -x assets/* net/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGELOG.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/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGES.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 . -x unused/* src/* wiki/* CHANGELOG.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip"
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar" -r . -x unused/* src/* wiki/* CHANGES.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip"
- 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 . -x data/* net/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGELOG.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar"
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip" -r . -x data/* net/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGES.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar"

# Upload
- name: Upload data pack version to Modrinth
Expand All @@ -95,7 +95,7 @@ jobs:

name: "[DP] Release v${{ github.event.inputs.tag }}"
version: ${{ github.event.inputs.tag }}
changelog-file: CHANGELOG.*
changelog-file: CHANGES.*

loaders: |
datapack
Expand All @@ -113,7 +113,7 @@ jobs:

name: "[Mod] Release v${{ github.event.inputs.tag }}"
version: ${{ github.event.inputs.tag }}+mod
changelog-file: CHANGELOG.*
changelog-file: CHANGES.*

dependencies: |
fabric-api(optional){modrinth:P7dR8mSH}
Expand All @@ -138,7 +138,7 @@ jobs:

name: "Release v${{ github.event.inputs.tag }}"
version: ${{ github.event.inputs.tag }}
changelog-file: CHANGELOG.*
changelog-file: CHANGES.*

loaders: |
datapack
Expand All @@ -156,7 +156,7 @@ jobs:

name: "Release v${{ github.event.inputs.tag }}"
version: ${{ github.event.inputs.tag }}+mod
changelog-file: CHANGELOG.*
changelog-file: CHANGES.*

dependencies: |
catalogue(optional){curseforge:459701}
Expand All @@ -173,7 +173,7 @@ jobs:
./${{ github.event.repository.name }}-*-mod.jar
- name: Add changelog header for GitHub release
run: sed -i '1i_Changelog:_' CHANGELOG.md
run: sed -i '1i_Changelog:_' CHANGES.md
- name: Upload outputs to GitHub releases
uses: Kir-Antipov/[email protected]
with:
Expand All @@ -183,7 +183,7 @@ jobs:

name: Release v${{ github.event.inputs.tag }}
version: v${{ github.event.inputs.tag }}
changelog-file: CHANGELOG.md
changelog-file: CHANGES.md

files: |
./${{ github.event.repository.name }}-*.@(zip|jar)
6 changes: 3 additions & 3 deletions .github/workflows/test_workflow.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 . -x assets/* net/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGELOG.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/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGES.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 . -x unused/* src/* wiki/* CHANGELOG.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip"
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar" -r . -x unused/* src/* wiki/* CHANGES.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip"
- 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 . -x data/* net/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGELOG.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar"
args: zip -qq "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-resourcepack.zip" -r . -x data/* net/* META-INF/* fabric.mod.json unused/* src/* wiki/* CHANGES.md ".*" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-datapack.zip" "${{ github.event.repository.name }}-v${{ github.event.inputs.tag }}-mc${{ github.event.inputs.mc_version }}-mod.jar"

# Upload
- name: Capture datapack build artifact
Expand Down
2 changes: 0 additions & 2 deletions CHANGELOG.md

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
- **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))
- Copied the contents of the legacy folders to their new names and removed unused code
- Used new enchantment check format in predicates
- Updated menu trigger to use advancements instead and added menu message header
- Fixed performance overlay for Minecraft 1.20.2+ not having an effect
- Updated LICENSE
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ This license shall be included in all copies or substantial portions of this pro

Permitted Uses:

1. You are PERMITTED to freely use this project on singleplayer worlds and multiplayer worlds/servers in your Minecraft game.
1. You are PERMITTED to freely use this project on singleplayer worlds and private multiplayer worlds/servers in your Minecraft game.

2. You are PERMITTED to modify this project's code for personal use or on your own private servers.
2. You are PERMITTED to modify this project's code for personal use and/or for contribution to this project.

3. You are PERMITTED to view this project's code, take reference, and learn from it.

4. You are PERMITTED to create content (e.g., videos, livestreams) covering and showcasing this project on websites such as YouTube, Twitch, Instagram, TikTok, etc., or on your own website, IF you provide a prominent link back to at least one of the official download locations ([GitHub](https://github.com/Tschipcraft/dynamiclights), [CurseForge](https://www.curseforge.com/minecraft/texture-packs/tschipcrafts-dynamic-lights), [Modrinth](https://modrinth.com/datapack/dynamic-lights)) in the description or an easily accessible place. You may also monetize this content.

5. You are PERMITTED to include this project in your modpack, IF you link back to at least one of the official download locations ([GitHub](https://github.com/Tschipcraft/dynamiclights), [CurseForge](https://www.curseforge.com/minecraft/texture-packs/tschipcrafts-dynamic-lights), [Modrinth](https://modrinth.com/datapack/dynamic-lights)), or by simply adding this project in the embedded or included mods sections directly on Modrinth and/or CurseForge.

6. You are PERMITTED to use parts or the whole project in your own project (Mod, Data Pack, Resource Pack, Map, Server, etc.), IF you obtain explicit permission from the creator (Tschipcraft) first. To request permission, please contact me via email at [email protected] or message me directly on Planet Minecraft (https://www.planetminecraft.com/account/pms/new/tschipo), CurseForge (https://legacy.curseforge.com/private-messages/send?recipient=tschipcraft), or Discord (@tschipo) and include detailed information about your intentions.
6. You are PERMITTED to use parts or the whole project in your own project (Mod, Data Pack, Resource Pack, Map, Public Server, etc.), IF you obtain explicit permission from the creator (Tschipcraft) first. To request permission, please contact me via email at [email protected] or message me directly on Planet Minecraft (https://www.planetminecraft.com/account/pms/new/tschipo), CurseForge (https://legacy.curseforge.com/private-messages/send?recipient=tschipcraft), or Discord (@tschipo) and include detailed information about your intentions.


Prohibited Uses:
Expand Down
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<a href="https://github.com/Tschipcraft/dynamiclights/releases/latest"><img alt="GitHub Downloads" src="https://img.shields.io/github/downloads/Tschipcraft/dynamiclights/total?logo=github&colorA=0c0906&colorB=fbc703&style=for-the-badge"></a>
</p>

> A server-side data pack/mod for Minecraft 1.17x-1.20x
> A server-side data pack/mod for Minecraft 1.17x-1.21x
<details>
<summary>YouTube showcase</summary>
Expand All @@ -22,16 +22,12 @@

Supported entities and items such as torches or lanterns will emit light by using the light block added in 21w13a. Because of this, the dynamic lights are limited to the block grid. (see [#9](https://github.com/Tschipcraft/dynamiclights/issues/9) for more information)

**Supported Items:** Torches, Lanterns, Campfires, Glowstone, Glowstone Dust, Blaze Rods, Blaze Powder, Spectral Arrows, Lava Buckets, Sea Lanterns, Prismarine Crystals, Froglights, Glow Ink Sacs, Glow Berries, Glow Item Frames, Glow Lichen, Jack o'Lanterns, Shroomlights, End Rods, End Crystals, Fire Charge, Amethyst Shards, Nether Stars, Ender Chests and Beacons
Some items are water sensitive and only turn off or on inside water. Additionally, all enchanted items will emit light level 6 while some enchants under certain conditions emit light level 9.
For a detailed overview of all supported items and entities, take a look at the wiki pages linked below.

Additionally, all enchanted items will emit light level 6 while Fire Aspect, Riptide or Channeling enchanted items emit light level 9.
Since this project is completely server-side, players joining a server with Dynamic Lights installed will not need to install anything on their end for it to work! However, you can still use the mod version on the client for single-player worlds only. Joining a server that does not have Dynamic Lights installed will have no effect.

**Supported Entities:** Allays, Glow Squids, Glow Item Frames, Blazes, TNT, End Crystals, Fireballs, Spectral Arrows, Shulker Bullets, Firework Rockets and Flying Wither Skulls

Since this project is completely server-side, players joining a server with Dynamic Lights installed do not have to install anything on their end for it to work! Nontheless, you can still use the mod on
the client for singleplayer worlds only. Joining a server that has not installed Dynamic Lights will have no effect.

[➜ For available settings and planned features, take a look at the wiki](https://github.com/Tschipcraft/dynamiclights/wiki)
[➜ For a detailed overview and available settings, take a look at the wiki](https://github.com/Tschipcraft/dynamiclights/wiki)


## Installation
Expand All @@ -46,7 +42,7 @@ Also available on Modrinth and CurseForge!
<picture>
<source height="72px" media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/Tschipcraft/badges/main/assets/modrinth-badge-dark.svg">
<source height="72px" media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/Tschipcraft/badges/main/assets/modrinth-badge-light.svg">
<img height="72px" alt="Download on Modrinth" src="https://raw.githubusercontent.com/modrinth/art/main/Branding/Badge/badge-dark.svg">
<img height="72px" alt="Download on Modrinth" src="https://raw.githubusercontent.com/Tschipcraft/badges/main/assets/modrinth-badge-dark.svg">
</picture>
</a>
<a href="https://www.curseforge.com/minecraft/texture-packs/tschipcrafts-dynamic-lights">
Expand Down
25 changes: 10 additions & 15 deletions data/dynamiclights/function/install.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ scoreboard objectives add ts.dl.shulker dummy

# Item score specification
# Type:
# 1: Light level 3 (unused)
# 1: Light level 3
# 2: Light level 6
# 3: Light level 9
# 4: Light level 12 (unused)
# 4: Light level 12
# 5: Light level 15
# 6: Light level 3 (unused) outside water
# 6: Light level 3 outside water
# 7: Light level 6 outside water
# 8: Light level 9 outside water
# 9: Light level 12 (unused) outside water
# 9: Light level 12 outside water
# 10: Light level 15 outside water
# 11: Light level 3 (unused) inside water
# 11: Light level 3 inside water
# 12: Light level 6 inside water
# 13: Light level 9 inside water
# 14: Light level 12 (unused) inside water
# 14: Light level 12 inside water
# 15: Light level 15 inside water
scoreboard objectives add ts.dl.i.type dummy

Expand All @@ -39,7 +39,6 @@ scoreboard objectives add ts.dl.l.level dummy
# Scoreboard for any temporary values
scoreboard objectives add ts.dl.temp dummy

scoreboard objectives add ts.dl.mess.welc dummy
scoreboard objectives add ts.dl.settings dummy

# defaults
Expand All @@ -64,15 +63,11 @@ scoreboard objectives add tschipcraft.menu trigger
scoreboard objectives add tvc_ignore dummy

## Set load status
# 17 for v1.7
scoreboard players set dynamiclights load.status 17
# 18 for v1.8
scoreboard players set dynamiclights load.status 18

# Reset advancement
advancement revoke @a only dynamiclights:interacted_with_item_frame
advancement revoke @a only tschipcraft:menu

## Schedule functions
## Schedule main function
schedule function dynamiclights:internal/main 5t
schedule function dynamiclights:internal/loop 4t

# Break for any version below Minecraft 1.17
execute if entity @e[type=minecraft:marker,limit=1]

This file was deleted.

6 changes: 0 additions & 6 deletions data/dynamiclights/function/internal/loop.mcfunction

This file was deleted.

3 changes: 0 additions & 3 deletions data/dynamiclights/function/internal/main.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@ execute unless score $global ts.dl.tnt.fuse matches 1 as @e[type=!#dynamiclights
# Clear old lights
execute as @e[type=minecraft:marker,tag=ts.dl.remove] at @s run function dynamiclights:internal/remove_light

# Menu
function dynamiclights:internal/menu

# Repeat
schedule function dynamiclights:internal/main 1t
9 changes: 0 additions & 9 deletions data/dynamiclights/function/internal/menu.mcfunction

This file was deleted.

4 changes: 0 additions & 4 deletions data/dynamiclights/function/internal/menu_reset.mcfunction

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
## by Tschipcraft

tellraw @s ["",{"text":"\n▶ Dynamic Lights v${version} by Tschipcraft installed!","italic":false,"color":"green"},{"text":"\n"},{"text":"[Settings]","color":"aqua","clickEvent":{"action":"run_command","value":"/function dynamiclights:settings"},"hoverEvent":{"action":"show_text","contents":"☵ Open the settings menu."}},{"text":" "},{"text":"[Reset]","color":"red","clickEvent":{"action":"run_command","value":"/function dynamiclights:reset"},"hoverEvent":{"action":"show_text","contents":["",{"text":"⏏ Reset the data pack/mod.","color":"white"}]}},{"text":" "},{"text":"[Uninstall]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function dynamiclights:uninstall"},"hoverEvent":{"action":"show_text","contents":["",{"text":"⏻ Uninstall the data pack/mod.","color":"white"}]}},{"text":" \n"},{"text":"[Report an issue]","color":"gold","clickEvent":{"action":"open_url","value":"https://github.com/Tschipcraft/dynamiclights/issues/new/choose"},"hoverEvent":{"action":"show_text","contents":"✉ Report an issue on GitHub."}},{"text":" "},{"text":"[Check for updates]","color":"blue","clickEvent":{"action":"open_url","value":"https://tschipcraft.ddns.net/update/test.html?pack=dynamiclights&v=${version}"},"hoverEvent":{"action":"show_text","contents":"🔔 Check for updates on my website."}}]
scoreboard players set @s ts.dl.mess.welc 1
tellraw @s ["",{"text":"\n▶ Dynamic Lights v${version} by Tschipcraft installed!","italic":false,"color":"green"},{"text":"\n"},{"text":"[Settings]","color":"aqua","clickEvent":{"action":"run_command","value":"/function dynamiclights:settings"},"hoverEvent":{"action":"show_text","contents":"☵ Open the settings menu."}},{"text":" "},{"text":"[Reset]","color":"red","clickEvent":{"action":"run_command","value":"/function dynamiclights:reset"},"hoverEvent":{"action":"show_text","contents":["",{"text":"⏏ Reset the data pack/mod.","color":"white"}]}},{"text":" "},{"text":"[Uninstall]","color":"dark_red","clickEvent":{"action":"run_command","value":"/function dynamiclights:uninstall"},"hoverEvent":{"action":"show_text","contents":["",{"text":"⏻ Uninstall the data pack/mod.","color":"white"}]}},{"text":" \n"},{"text":"[Report an issue]","color":"gold","clickEvent":{"action":"open_url","value":"https://github.com/Tschipcraft/dynamiclights/issues"},"hoverEvent":{"action":"show_text","contents":"✉ Report an issue on GitHub."}},{"text":" "},{"text":"[Check for updates]","color":"blue","clickEvent":{"action":"open_url","value":"https://tschipcraft.ddns.net/update/test.html?pack=dynamiclights&v=${version}"},"hoverEvent":{"action":"show_text","contents":"🔔 Check for updates on my website."}}]

This file was deleted.

Loading

0 comments on commit 96a4df7

Please sign in to comment.