-
-
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.
- Updated to work with Snapshot 24w21a (#29) - Copied the contents of the legacy folders to their new names - Updated GitHub workflow to properly exclude folders
- Loading branch information
1 parent
2ea659d
commit 6a600f9
Showing
237 changed files
with
4,602 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
##by Tschipcraft | ||
# Places a dynamic light block with light level 12 near the provided location (~ ~ ~) that will disappear after 1 tick | ||
# Additionally sets the score #check_passed ts.dl.temp to 1 | ||
|
||
scoreboard players set #check_passed ts.dl.temp 1 | ||
|
||
function dynamiclights:internal/place_light/12/exec |
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,7 @@ | ||
##by Tschipcraft | ||
# Places a dynamic light block with light level 15 near the provided location (~ ~ ~) that will disappear after 1 tick | ||
# Additionally sets the score #check_passed ts.dl.temp to 1 | ||
|
||
scoreboard players set #check_passed ts.dl.temp 1 | ||
|
||
function dynamiclights:internal/place_light/15/exec |
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,7 @@ | ||
##by Tschipcraft | ||
# Places a dynamic light block with light level 3 near the provided location (~ ~ ~) that will disappear after 1 tick | ||
# Additionally sets the score #check_passed ts.dl.temp to 1 | ||
|
||
scoreboard players set #check_passed ts.dl.temp 1 | ||
|
||
function dynamiclights:internal/place_light/3/exec |
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,7 @@ | ||
##by Tschipcraft | ||
# Places a dynamic light block with light level 6 near the provided location (~ ~ ~) that will disappear after 1 tick | ||
# Additionally sets the score #check_passed ts.dl.temp to 1 | ||
|
||
scoreboard players set #check_passed ts.dl.temp 1 | ||
|
||
function dynamiclights:internal/place_light/6/exec |
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,7 @@ | ||
##by Tschipcraft | ||
# Places a dynamic light block with light level 9 near the provided location (~ ~ ~) that will disappear after 1 tick | ||
# Additionally sets the score #check_passed ts.dl.temp to 1 | ||
|
||
scoreboard players set #check_passed ts.dl.temp 1 | ||
|
||
function dynamiclights:internal/place_light/9/exec |
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,78 @@ | ||
##by Tschipcraft | ||
|
||
## Initalise scoreboards | ||
scoreboard objectives add ts.dl.ghast_cool dummy | ||
scoreboard objectives add ts.dl.in_water dummy | ||
scoreboard objectives add ts.dl.in_rain dummy | ||
scoreboard objectives add ts.dl.sound dummy | ||
scoreboard objectives add ts.dl.tnt.fuse dummy | ||
scoreboard objectives add ts.dl.shulker dummy | ||
|
||
# Item score specification | ||
# Type: | ||
# 1: Light level 3 (unused) | ||
# 2: Light level 6 | ||
# 3: Light level 9 | ||
# 4: Light level 12 (unused) | ||
# 5: Light level 15 | ||
# 6: Light level 3 (unused) outside water | ||
# 7: Light level 6 outside water | ||
# 8: Light level 9 outside water | ||
# 9: Light level 12 (unused) outside water | ||
# 10: Light level 15 outside water | ||
# 11: Light level 3 (unused) inside water | ||
# 12: Light level 6 inside water | ||
# 13: Light level 9 inside water | ||
# 14: Light level 12 (unused) inside water | ||
# 15: Light level 15 inside water | ||
scoreboard objectives add ts.dl.i.type dummy | ||
|
||
scoreboard objectives add ts.dl.i.is_ench dummy | ||
scoreboard objectives add ts.dl.i.is_ameth dummy | ||
scoreboard objectives add ts.dl.i.is_firea dummy | ||
scoreboard objectives add ts.dl.i.is_ript dummy | ||
scoreboard objectives add ts.dl.i.is_chann dummy | ||
|
||
# Light level associated with marker entities | ||
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 | ||
execute unless score $enable_on_fire ts.dl.settings matches -1..2 run scoreboard players set $enable_on_fire ts.dl.settings 1 | ||
execute unless score $enable_glowing ts.dl.settings matches -1..2 run scoreboard players set $enable_glowing ts.dl.settings 0 | ||
execute unless score $fire_aspect ts.dl.settings matches -1..2 run scoreboard players set $fire_aspect ts.dl.settings 1 | ||
execute unless score $riptide ts.dl.settings matches -1..2 run scoreboard players set $riptide ts.dl.settings 1 | ||
execute unless score $channeling ts.dl.settings matches -1..2 run scoreboard players set $channeling ts.dl.settings 1 | ||
execute unless score $enchanted_items ts.dl.settings matches -1..2 run scoreboard players set $enchanted_items ts.dl.settings 1 | ||
execute unless score $amethyst_trimmed ts.dl.settings matches -1..2 run scoreboard players set $amethyst_trimmed ts.dl.settings 1 | ||
execute unless score $enable_ghast ts.dl.settings matches -1..2 run scoreboard players set $enable_ghast ts.dl.settings 1 | ||
|
||
execute unless score $water_sensitive ts.dl.settings matches -1..2 run scoreboard players set $water_sensitive ts.dl.settings 1 | ||
execute unless score $enable_sound ts.dl.settings matches -1..2 run scoreboard players set $enable_sound ts.dl.settings 1 | ||
execute unless score $rain_sensitive ts.dl.settings matches -1..2 run scoreboard players set $rain_sensitive ts.dl.settings 1 | ||
|
||
# Hidden | ||
execute unless score $unlimited ts.dl.settings matches -1..2 run scoreboard players set $unlimited ts.dl.settings 0 | ||
|
||
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 | ||
|
||
# Reset advancement | ||
advancement revoke @a only dynamiclights:interacted_with_item_frame | ||
|
||
## Schedule functions | ||
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 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 @@ | ||
##by Tschipcraft | ||
|
||
function dynamiclights:internal/version_checker/start | ||
function dynamiclights:install |
4 changes: 4 additions & 0 deletions
4
data/dynamiclights/function/internal/enchantments/activate/channeling.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 @@ | ||
##by Tschipcraft | ||
|
||
playsound minecraft:block.beacon.power_select player @a ~ ~ ~ 0.3 | ||
scoreboard players set @s ts.dl.sound 2 |
4 changes: 4 additions & 0 deletions
4
data/dynamiclights/function/internal/enchantments/activate/riptide.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 @@ | ||
##by Tschipcraft | ||
|
||
playsound minecraft:block.conduit.activate player @a ~ ~ ~ 0.8 | ||
scoreboard players set @s ts.dl.sound 1 |
4 changes: 4 additions & 0 deletions
4
data/dynamiclights/function/internal/enchantments/deactivate/channeling.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 @@ | ||
##by Tschipcraft | ||
|
||
playsound minecraft:block.beacon.deactivate player @a ~ ~ ~ 0.3 | ||
scoreboard players set @s ts.dl.sound 0 |
4 changes: 4 additions & 0 deletions
4
data/dynamiclights/function/internal/enchantments/deactivate/riptide.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 @@ | ||
##by Tschipcraft | ||
|
||
playsound minecraft:block.conduit.deactivate player @a ~ ~ ~ 0.3 | ||
scoreboard players set @s ts.dl.sound 0 |
4 changes: 4 additions & 0 deletions
4
data/dynamiclights/function/internal/explosion_detection/reset.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 @@ | ||
##by Tschipcraft | ||
# Resets the global explosion alarm | ||
|
||
scoreboard players reset $global ts.dl.tnt.fuse |
7 changes: 7 additions & 0 deletions
7
data/dynamiclights/function/internal/explosion_detection/setup/tnt.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,7 @@ | ||
##by Tschipcraft | ||
# Gets initial fuse of tnt | ||
|
||
# Fuse NBT tag was renamed in 23w42a | ||
execute if score $global ts.dl.version matches 3684.. store result score @s ts.dl.tnt.fuse run data get entity @s fuse | ||
execute if score $global ts.dl.version matches ..3683 store result score @s ts.dl.tnt.fuse run data get entity @s Fuse | ||
tag @s add ts.dl.tnt.setup |
10 changes: 10 additions & 0 deletions
10
data/dynamiclights/function/internal/explosion_detection/tnt.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,10 @@ | ||
##by Tschipcraft | ||
# Commands run by tnt per tick | ||
|
||
# Set up score for fuse | ||
execute as @s[tag=!ts.dl.tnt.setup] run function dynamiclights:internal/explosion_detection/setup/tnt | ||
|
||
# Decrement fuse and trigger if it hits 0 | ||
scoreboard players remove @s ts.dl.tnt.fuse 1 | ||
execute if score @s ts.dl.tnt.fuse matches ..1 run scoreboard players set $global ts.dl.tnt.fuse 1 | ||
execute if score @s ts.dl.tnt.fuse matches ..1 run schedule function dynamiclights:internal/explosion_detection/reset 1t |
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 @@ | ||
##by Tschipcraft | ||
|
||
execute as @s[predicate=dynamiclights:ghast_targeting] run scoreboard players add @s ts.dl.ghast_cool 1 | ||
execute as @s[predicate=!dynamiclights:ghast_targeting] run scoreboard players reset @s ts.dl.ghast_cool | ||
execute as @s[scores={ts.dl.ghast_cool=10..20}] at @s run function dynamiclights:api/place_light/15 | ||
execute as @s[scores={ts.dl.ghast_cool=60..}] run scoreboard players reset @s ts.dl.ghast_cool |
6 changes: 6 additions & 0 deletions
6
data/dynamiclights/function/internal/item_frame/interacted.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 @@ | ||
##by Tschipcraft | ||
# This function triggers whenever a player interacts with an item frame. It schedules a reparse of all near item frames for changed items. | ||
|
||
scoreboard players reset @e[type=#dynamiclights:reparse_interactible,distance=..7] ts.dl.i.type | ||
|
||
advancement revoke @s only dynamiclights:interacted_with_item_frame |
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 @@ | ||
##by Tschipcraft | ||
|
||
# Prevent vibrations | ||
tp @s ~ 320 ~ | ||
kill @s |
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 @@ | ||
##by Tschipcraft | ||
# Resets dynamic item holders such as item frames | ||
|
||
scoreboard players reset @e[type=#dynamiclights:reparse] ts.dl.i.type | ||
|
||
schedule function dynamiclights:internal/loop 4s |
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,19 @@ | ||
## by Tschipcraft | ||
|
||
# Tag old lights | ||
tag @e[type=minecraft:marker,tag=ts.dl.light] add ts.dl.remove | ||
|
||
# Detect explosions | ||
execute as @e[type=minecraft:tnt] at @s run function dynamiclights:internal/explosion_detection/tnt | ||
|
||
# Core | ||
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 | ||
|
||
# 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 |
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,12 @@ | ||
##by Tschipcraft | ||
|
||
## Ghast | ||
# Ghasts are excluded from the limited range, since shoot timer desynchronizes | ||
execute if score $enable_ghast ts.dl.settings matches 1..2 if entity @s[type=minecraft:ghast] at @s run function dynamiclights:internal/ghast | ||
|
||
## Check to avoid placing inside shulkers (#20) | ||
execute if entity @s[type=minecraft:shulker_bullet] align xyz positioned ~0.5 ~ ~0.5 store result score @s ts.dl.shulker if entity @e[type=minecraft:shulker,distance=..0.1] | ||
|
||
## Range limit | ||
execute if score $unlimited ts.dl.settings matches 1..2 unless entity @s[type=minecraft:shulker_bullet,scores={ts.dl.shulker=1}] run function dynamiclights:internal/main_exec_pass | ||
execute unless score $unlimited ts.dl.settings matches 1..2 unless entity @s[type=minecraft:shulker_bullet,scores={ts.dl.shulker=1}] if entity @p[gamemode=!spectator,distance=..65] run function dynamiclights:internal/main_exec_pass |
29 changes: 29 additions & 0 deletions
29
data/dynamiclights/function/internal/main_exec_pass.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,29 @@ | ||
##by Tschipcraft | ||
|
||
## In Rain? (exclusive 1.19.4+ feature) | ||
scoreboard players reset @s ts.dl.in_rain | ||
execute if score $global ts.dl.version matches 3337.. if score $rain_sensitive ts.dl.settings matches 1..2 if predicate dynamiclights:world/is_raining run function dynamiclights:internal/water/rain_check_1194 | ||
|
||
## In water? | ||
scoreboard players add @s ts.dl.in_water 0 | ||
execute if score $water_sensitive ts.dl.settings matches 1..2 as @s[scores={ts.dl.in_water=0}] anchored eyes positioned ^ ^ ^ if predicate dynamiclights:entity/is_in_water run function dynamiclights:internal/water/enter | ||
execute as @s[type=!minecraft:item,scores={ts.dl.in_water=1}] anchored eyes positioned ^ ^ ^ unless predicate dynamiclights:entity/is_in_water run function dynamiclights:internal/water/exit | ||
execute as @s[type=minecraft:item,scores={ts.dl.in_water=1}] anchored eyes positioned ^ ^ ^ positioned ~ ~-0.1 ~ unless predicate dynamiclights:entity/is_in_water run function dynamiclights:internal/water/exit | ||
|
||
## Sound cues for trident enchants | ||
scoreboard players add @s ts.dl.sound 0 | ||
execute if score $enable_sound ts.dl.settings matches 1..2 as @s[scores={ts.dl.sound=0},predicate=dynamiclights:entity/has_riptide_trident] run function dynamiclights:internal/enchantments/activate/riptide | ||
execute if score $enable_sound ts.dl.settings matches 1..2 as @s[scores={ts.dl.sound=1},predicate=!dynamiclights:entity/has_riptide_trident] run function dynamiclights:internal/enchantments/deactivate/riptide | ||
|
||
execute if score $enable_sound ts.dl.settings matches 1..2 as @s[scores={ts.dl.sound=0},predicate=dynamiclights:entity/has_channeling_trident] run function dynamiclights:internal/enchantments/activate/channeling | ||
execute if score $enable_sound ts.dl.settings matches 1..2 as @s[scores={ts.dl.sound=2},predicate=!dynamiclights:entity/has_channeling_trident] run function dynamiclights:internal/enchantments/deactivate/channeling | ||
|
||
## Dispatch light | ||
function dynamiclights:internal/sources/core | ||
|
||
# Light block sadly blocks explosion damage | ||
#execute as @s[type=minecraft:creeper,nbt={ignited:1b},tag=!global.ignore,tag=!smithed.strict] at @s run function dynamiclights:api/place_light/15 | ||
|
||
## Extension for More Mobs | ||
execute as @s[type=minecraft:wither_skeleton,tag=ts.mm.magma_1] at @s run function dynamiclights:api/place_light/6 | ||
execute as @s[type=minecraft:wither_skeleton,tag=ts.mm.magma_2] at @s run function dynamiclights:api/place_light/9 |
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,9 @@ | ||
##by Tschipcraft | ||
|
||
## Menu message | ||
scoreboard players enable @a tschipcraft.menu | ||
#scoreboard players add @a ts.dl.mess.welcome 0 - don't show menu on first boot | ||
execute as @a[scores={tschipcraft.menu=1..}] run scoreboard players set @s ts.dl.mess.welc 0 | ||
execute as @a[scores={ts.dl.mess.welc=0}] run function dynamiclights:internal/messages/welcome | ||
|
||
execute as @a[scores={tschipcraft.menu=1..}] run schedule function dynamiclights:internal/menu_reset 1t |
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 @@ | ||
##by Tschipcraft | ||
|
||
scoreboard players reset @a[scores={tschipcraft.menu=1..}] ts.dl.mess.welc | ||
scoreboard players reset @a[scores={tschipcraft.menu=1..}] tschipcraft.menu |
4 changes: 4 additions & 0 deletions
4
data/dynamiclights/function/internal/messages/welcome.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 @@ | ||
## 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 |
11 changes: 11 additions & 0 deletions
11
data/dynamiclights/function/internal/place_light/12/exec.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,11 @@ | ||
##by Tschipcraft | ||
# Initiates finding a valid location to place the dynamic light | ||
|
||
# Reset check score | ||
scoreboard players set #block_placed ts.dl.temp 0 | ||
|
||
# Try current location | ||
execute if predicate dynamiclights:world/place_light/valid_pos run function dynamiclights:internal/place_light/12/summon | ||
|
||
# If not valid, try deeper layer | ||
execute unless score #block_placed ts.dl.temp matches 1 run function dynamiclights:internal/place_light/12/find_place/layer_1 |
13 changes: 13 additions & 0 deletions
13
data/dynamiclights/function/internal/place_light/12/find_place/layer_1.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,13 @@ | ||
##by Tschipcraft | ||
# Finds a location to place a dynamic light | ||
|
||
execute positioned ~ ~1 ~ if predicate dynamiclights:world/place_light/valid_pos run function dynamiclights:internal/place_light/12/summon | ||
|
||
execute unless score #block_placed ts.dl.temp matches 1 positioned ~1 ~ ~ if predicate dynamiclights:world/place_light/valid_pos run function dynamiclights:internal/place_light/12/summon | ||
execute unless score #block_placed ts.dl.temp matches 1 positioned ~-1 ~ ~ if predicate dynamiclights:world/place_light/valid_pos run function dynamiclights:internal/place_light/12/summon | ||
|
||
execute unless score #block_placed ts.dl.temp matches 1 positioned ~ ~ ~1 if predicate dynamiclights:world/place_light/valid_pos run function dynamiclights:internal/place_light/12/summon | ||
execute unless score #block_placed ts.dl.temp matches 1 positioned ~ ~ ~-1 if predicate dynamiclights:world/place_light/valid_pos run function dynamiclights:internal/place_light/12/summon | ||
|
||
# Try deeper layer | ||
execute unless score #block_placed ts.dl.temp matches 1 run function dynamiclights:internal/place_light/12/find_place/layer_2 |
Oops, something went wrong.