Dynamic Lights [Data Pack]

Dynamic Lights [Data Pack]

219k Downloads

Options to configure dynamic light sources

onebeastchris opened this issue ยท 5 comments

commented

Is your feature request related to a problem? Please describe.

Hey there! first off, nice datapack - it works very well :)
I just had an idea for a feature:

Describe the feature you'd like

  • Option to turn of dynamic lights on a player by player basis
  • option to turn of dynamic lights for certain items (i unfortunately dont want enchanted armor to glow)

Describe alternatives you've considered

manually editing the pack could work; if i knew how :/

Additional context

No response

commented

Thanks <3

An option to turn off dynamic lights on a player to player basis is sadly not possible, because the light block used by this data pack is considered a placed light source by the game (the same as e.g. a placed torch). If the player that has it disabled is alone, this may work, until a player that has it enabled is near. Then, both players will see the light emitting from the player that enabled it.

Turning off certain items is possible, but really not user-friendly, since the item displayed by item entities and item frames sadly can't be compared to an item tag list like everything else. I may add a tutorial for this in the wiki at some point.

The enchanted item glow uses a different approach though, and I'm planning on adding options for this as well as for other glowing effects that may not be wanted by all players.

Edit: Options to configure light sources have been implemented as of v1.6. Additionally, turning off certain items is now easier, as I found a way to compare the item displayed by item entities and item frames to the tag lists. A tutorial can be found in the wiki.

commented

tysm for your detailed reply! Even a manual way as you described would help, as one can safely assume that this isn't something people would change frequently.

commented

Since I wasn't able to add more options and won't be for the next month due to my finals, here is a manual way to disable the glow on enchanted items:

  1. Unzip the data pack
  2. In \data\dynamiclights\predicates\soul_light.json, remove , { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "mainhand": { "count": { "min": 1 }, "enchantments": [ { "enchantment": "minecraft:fire_aspect", "levels": { "min": 1 } } ] } } } }, { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "offhand": { "count": { "min": 1 }, "enchantments": [ { "enchantment": "minecraft:fire_aspect", "levels": { "min": 1 } } ] } } } }
  3. In \data\dynamiclights\predicates\redstone_light.json, remove , { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "mainhand": { "count": { "min": 1 }, "enchantments": [ { "levels": { "min": 1 } } ] } } } }, { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "offhand": { "count": { "min": 1 }, "enchantments": [ { "levels": { "min": 1 } } ] } } } }, { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "head": { "count": { "min": 1 }, "enchantments": [ { "levels": { "min": 1 } } ] } } } }, { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "chest": { "count": { "min": 1 }, "enchantments": [ { "levels": { "min": 1 } } ] } } } }, { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "legs": { "count": { "min": 1 }, "enchantments": [ { "levels": { "min": 1 } } ] } } } }, { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "feet": { "count": { "min": 1 }, "enchantments": [ { "levels": { "min": 1 } } ] } } } }
  4. In \data\dynamiclights\functions\sources\item.mcfunction, remove execute as @s[nbt={Item:{tag:{Enchantments:[{}]}}}] if predicate dynamiclights:visible run function dynamiclights:summon_redstone_light
  5. Rezip the data pack if needed

Sorry for taking my sweet time on this, I wanted to implement options for it, got stressed with exams and forgot about it (Got reminded by the E-mail notification I got from your new issue)

commented

I see, that could become a problem. I'll add that to the settings description when I implement them.

commented

Thanks for the guide, just used it & works excellent!

One sidenote - I think that feature effectively reduces the efficiency of hostile mob farms, as in new versions mobs only spawn in light level 0 (which isn't present once a mob has enchanted armor)