AtomicStryker / atomicstrykers-minecraft-mods

Repository for my open source Minecraft Mods
https://atomicstryker.github.io/
181 stars 97 forks source link

[Dynamic Lights] [1.19.2] Items with nbt data stop working a light source #481

Closed studkid closed 1 year ago

studkid commented 1 year ago

If you set a light source to work with an item that can have nbt data applied to it, such as armor or tools, the item will stop emitting light once any nbt tag is added to it.

AtomicStryker commented 1 year ago

Technically the item doesnt match the configured item anymore - the configuration strings do include NBT tags.

There is no support for partial matches or wildcards, however. If you have a suggestion how those could be implemented?

studkid commented 1 year ago

I think preferably being able to have wildcard matches would be nice if that is possible. Would like to have items that can take durability damage without effect the light aura.

AtomicStryker commented 1 year ago

So here is how these NBT strings look in the config:

"{lightLevel:15s,nameId:\"minecraft:glowstone\"}",
"{Damage:32,lightLevel:14s,nameId:\"minecraft:flint_and_steel\"}"

I implemented a check for a new tag "anyNbtMatch", with that present Dynamic Lights will stop comparing nbt equality

implemented for 1.19 and 1.20, new builds pushed to curse https://github.com/AtomicStryker/atomicstrykers-minecraft-mods/commit/74b2c68c1344bffe0944b18395003c319c8c7fce https://github.com/AtomicStryker/atomicstrykers-minecraft-mods/commit/149a172ebc3d39bd7b8b3f6edfacd23f89cb6191