Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options to configure dynamic light sources #3

Closed
onebeastchris opened this issue Mar 1, 2023 · 5 comments
Closed

Options to configure dynamic light sources #3

onebeastchris opened this issue Mar 1, 2023 · 5 comments
Assignees
Labels
feature request New feature or request

Comments

@onebeastchris
Copy link

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

@Tschipcraft Tschipcraft added the feature request New feature or request label Mar 1, 2023
@Tschipcraft
Copy link
Owner

Tschipcraft commented Mar 1, 2023

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.

@Tschipcraft Tschipcraft changed the title option to configure glowing Options to configure dynamic light sources Mar 1, 2023
@onebeastchris
Copy link
Author

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.

@Tschipcraft
Copy link
Owner

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)

@Tschipcraft Tschipcraft self-assigned this Mar 28, 2023
@onebeastchris
Copy link
Author

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)

@Tschipcraft
Copy link
Owner

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

Tschipcraft added a commit that referenced this issue Jun 5, 2023
- Fixed incompatibility with Minecraft 1.20 (closes #5)
- Added sound cues for water sensitive items
- Implemented options to configure dynamic light sources on the back end (#3)
- Tidied up tag lists and naming inconsistencies
- Added light level 15 to ghasts that are about to shoot a fireball
- Configured sea pickles and prismarine crystals to only turn on inside water
- Added amethyst clusters to light level 6 items
- Moved TNT to light level 6
- Fixed triggered campfire_check to apply its lock to the whole entity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants