Skip to content

Commit

Permalink
Changes to light emitting items and entities
Browse files Browse the repository at this point in the history
- Added JSON files for the to be implemented intermediate light levels 3 and 12 (#14)
  - Added magma blocks, all remaining amethyst buds, heart of the sea and totem of undying (closes #23) to light level 3 items
  - By default, there are no light level 12 items
- Changed some tags entries:
  - 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
  - Added enchanting table, 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
- Updated changelog file
  • Loading branch information
Tschipcraft committed Apr 20, 2024
1 parent c3efcb6 commit 4b48a55
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 52 deletions.
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
- **Update to Minecraft 1.20.5**
- **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))
- **Update to Minecraft 1.20.5**
These changes utilize overlays and therefore don't break backwards compatibility:
- Switched to testing components rather than NBT in predicates
- Added support for the newly added contents slot in predicates
- Fixed some item slot locations triggering light when they shouldn't
- **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**
- Improved performance of explosion avoidance for dynamic lights by checking a global score instead of scanning for nearby area effect clouds
- Simplified light block placement and removal
- Fixed shulkers teleporting away when shooting (closes [#20](https://github.com/Tschipcraft/dynamiclights/issues/20))
- Fixed dynamic lights overwriting cave_air with air
- Eventified item frame reparsing in versions before 1.20.5
Item frame reparse now triggers when a player right-clicks on an item frame or when an item drops nearby in versions before 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))
- Gave dynamic light marker entities a custom name ([#19](https://github.com/Tschipcraft/dynamiclights/issues/19))
- Fixed dynamic light position offset for item entities
- Added separate mod support tag lists for modded items
1 change: 1 addition & 0 deletions data/dynamiclights/tags/entity_types/dyn_ignore.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"minecraft:leash_knot",
"minecraft:llama_spit",
"minecraft:marker",
"minecraft:painting",
{"id": "minecraft:text_display", "required": false},
{"id": "minecraft:interaction", "required": false}
]
Expand Down
6 changes: 6 additions & 0 deletions data/dynamiclights/tags/entity_types/light_level/12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"//comment": "Entities specified here will always emit light level 12",
"replace": false,
"values": [
]
}
6 changes: 6 additions & 0 deletions data/dynamiclights/tags/entity_types/light_level/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"//comment": "Entities specified here will always emit light level 3",
"replace": false,
"values": [
]
}
1 change: 1 addition & 0 deletions data/dynamiclights/tags/entity_types/light_level/9.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"minecraft:spectral_arrow",
"minecraft:firework_rocket",
"minecraft:wither_skull",
"minecraft:small_fireball",
{"id": "minecraft:allay", "required": false}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"minecraft:creeper",
"minecraft:fireball",
"minecraft:small_fireball",
"minecraft:wither_skull"
"minecraft:wither_skull",
"minecraft:tnt_minecart"
]
}
7 changes: 7 additions & 0 deletions data/dynamiclights/tags/items/light_level/12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"//comment": "Items listed here will emit light level 12",
"replace": false,
"values": [
{"id": "#dynamiclights:mod_support/light_level/12", "required": false}
]
}
37 changes: 19 additions & 18 deletions data/dynamiclights/tags/items/light_level/15.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"//comment": "Items listed here will emit light level 15",
"replace": false,
"values": [
"minecraft:torch",
"minecraft:lantern",
"minecraft:campfire",
"minecraft:lava_bucket",
"minecraft:glowstone",
"minecraft:glowstone_dust",
"minecraft:sea_lantern",
"minecraft:jack_o_lantern",
"minecraft:shroomlight",
"minecraft:end_rod",
"minecraft:beacon",
{"id": "minecraft:ochre_froglight", "required": false},
{"id": "minecraft:pearlescent_froglight", "required": false},
{"id": "minecraft:verdant_froglight", "required": false}
]
"//comment": "Items listed here will emit light level 15",
"replace": false,
"values": [
"minecraft:torch",
"minecraft:lantern",
"minecraft:campfire",
"minecraft:lava_bucket",
"minecraft:glowstone",
"minecraft:sea_lantern",
"minecraft:jack_o_lantern",
"minecraft:shroomlight",
"minecraft:end_rod",
"minecraft:beacon",
"minecraft:conduit",
{"id": "minecraft:ochre_froglight", "required": false},
{"id": "minecraft:pearlescent_froglight", "required": false},
{"id": "minecraft:verdant_froglight", "required": false},
{"id": "#dynamiclights:mod_support/light_level/15", "required": false}
]
}
13 changes: 13 additions & 0 deletions data/dynamiclights/tags/items/light_level/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"//comment": "Items listed here will emit light level 3",
"replace": false,
"values": [
"minecraft:magma_block",
"minecraft:large_amethyst_bud",
"minecraft:medium_amethyst_bud",
"minecraft:small_amethyst_bud",
"minecraft:heart_of_the_sea",
"minecraft:totem_of_undying",
{"id": "#dynamiclights:mod_support/light_level/3", "required": false}
]
}
28 changes: 16 additions & 12 deletions data/dynamiclights/tags/items/light_level/6.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"//comment": "Items listed here will emit light level 6",
"replace": false,
"values": [
"minecraft:redstone_torch",
"minecraft:fire_charge",
"minecraft:nether_star",
"minecraft:blaze_powder",
"minecraft:amethyst_shard",
"minecraft:amethyst_cluster",
"minecraft:glow_lichen",
"minecraft:ender_chest"
]
"//comment": "Items listed here will emit light level 6",
"replace": false,
"values": [
"minecraft:redstone_torch",
"minecraft:fire_charge",
"minecraft:blaze_powder",
"minecraft:nether_star",
"minecraft:amethyst_cluster",
"minecraft:amethyst_shard",
"minecraft:enchanting_table",
"minecraft:ender_chest",
"minecraft:sculk_catalyst",
"minecraft:glow_lichen",
{"id": "minecraft:vault", "required": false},
{"id": "#dynamiclights:mod_support/light_level/6", "required": false}
]
}
33 changes: 18 additions & 15 deletions data/dynamiclights/tags/items/light_level/9.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
{
"//comment": "Items listed here will emit light level 9",
"replace": false,
"values": [
"minecraft:soul_torch",
"minecraft:soul_lantern",
"minecraft:soul_campfire",
"minecraft:glow_ink_sac",
"minecraft:glow_item_frame",
"minecraft:glow_berries",
"minecraft:sea_pickle",
"minecraft:prismarine_crystals",
"minecraft:blaze_rod",
"minecraft:spectral_arrow",
"minecraft:end_crystal"
]
"//comment": "Items listed here will emit light level 9",
"replace": false,
"values": [
"minecraft:blaze_rod",
"minecraft:crying_obsidian",
"minecraft:end_crystal",
"minecraft:glow_berries",
"minecraft:glow_ink_sac",
"minecraft:glow_item_frame",
"minecraft:glowstone_dust",
"minecraft:prismarine_crystals",
"minecraft:sea_pickle",
"minecraft:soul_torch",
"minecraft:soul_lantern",
"minecraft:soul_campfire",
"minecraft:spectral_arrow",
{"id": "#dynamiclights:mod_support/light_level/9", "required": false}
]
}
6 changes: 6 additions & 0 deletions data/dynamiclights/tags/items/mod_support/light_level/12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"//comment": "Items listed here will emit light level 12 - Intended to get populated by mods",
"replace": false,
"values": [
]
}
9 changes: 9 additions & 0 deletions data/dynamiclights/tags/items/mod_support/light_level/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"//comment": "Items listed here will emit light level 3 - Intended to get populated by mods",
"replace": false,
"values": [
{"id": "#c:amethysts", "required": false},
{"id": "#c:glowing_calamari", "required": false},
{"id": "#forge:gems/amethyst", "required": false}
]
}
3 changes: 2 additions & 1 deletion data/dynamiclights/tags/items/water_sensitive/turn_off.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"minecraft:soul_torch",
"minecraft:soul_campfire",
"minecraft:redstone_torch",
"minecraft:fire_charge"
"minecraft:fire_charge",
{"id": "#dynamiclights:mod_support/water_sensitive/turn_off", "required": false}
]
}
4 changes: 3 additions & 1 deletion data/dynamiclights/tags/items/water_sensitive/turn_on.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"replace": false,
"values": [
"minecraft:sea_pickle",
"minecraft:prismarine_crystals"
"minecraft:prismarine_crystals",
"minecraft:heart_of_the_sea",
{"id": "#dynamiclights:mod_support/water_sensitive/turn_on", "required": false}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void onInitialize() {
ServerLifecycleEvents.SERVER_STARTED.register((server) -> {
if (FabricLoader.getInstance().isModLoaded("midnightlib")) {
// Use MidnightLib features
LOGGER.info("[Dynamic Lights] Sending global config to server...");
LOGGER.info("[Dynamic Lights] Sending global config to world...");
sendConfig.sendConfig(server);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Init() {
@SubscribeEvent
public void onServerStarted(ServerStartedEvent event) {
if (ModList.get().isLoaded("midnightlib")) {
LOGGER.info("[Dynamic Lights] Sending global config to server...");
LOGGER.info("[Dynamic Lights] Sending global config to world...");
sendConfig.sendConfig(event.getServer());
}
}
Expand Down

0 comments on commit 4b48a55

Please sign in to comment.