Dynamic Lights [Data Pack]

Dynamic Lights [Data Pack]

219k Downloads

I have phantom lights in my world

ninn opened this issue ยท 17 comments

commented

Describe the bug

Hi.
Hope this is the right way to report a (?) bug.

I used your dynlight mod over several months the last year, currently it is deinstalled.

Every now and then, I see phantom lights, where no lightsource should be. Probably where I dropped torches on the ground, but I can not be sure. I can see those spots on the ground, with lightlevels above 0 and no light emiting sources nearby.

I can not get rid of them, whatever I try. They appear in farms I built and it is rather annoying, because I found no way to remove them several month in.

Can you help me removing those lightsources? Is there a command to run and get rid of those phantom lights?

Thanks in advance,
John

Steps to reproduce

No response

Expected behavior

No response

Additional context

No response

commented

That's a shame, sorry for the issues. Since the commands don't work, the marker entities got removed somehow so the only option is to remove them manually by hand (you need to hold a light block in order to see them /give @s minecraft:light) or use a world editor like e.g. Amulet to remove them in bulk. If you want I could do this for you (since it's kinda my project's fault it even happened)

commented

Thanks a lot for sharing that valueable information!
I will try that out, thanks!

Do not feel bad. I really enjoyed the plugin a lot! And it is probably my fault, since I enabled/installed/disabled/removed the plugins out of order and tested everything possible. And I did that a lot with your plugin, because I was testing a lot with it.

I will report back!
Happy easter! :)

commented

I have deleted most of the stray lights.

I was unable to see the lights, with or without lightblock in my hands. but luckily I got carpetmod, and followed the lightlevel till I got to a lightlevel of 14, which was basicly the illuminated/shining block. It was like playing windows minesweeper, looking for the bomb. Placed a block there, - bam! - lights out.

observation:
Most of the light blocks where above ground. I expected them to be the torches I threw, but most of them where 4-10 blocks up (or down, in the case of my netherroof-farm). This made me think, that they were leftofters of elytra-flybys while holding a torch.

I got rid of most offending lights, and if I ever find more, I know exactly how to delete them!

Thanks so much for your (debugging) help and explanations! And for the datapack itself of course!

commented

That's interesting, I do not use light blocks with level 14, only 6, 9 and 15. So if the light levels only go to 14 and no light block is near when holding the light item, this might have been the blocks around the dynamic lights not updating in time and not loosing their light values.. So I guess the problem never was my project but just Minecraft's light engine..?

Anyway, glad it worked, happy Easter to you as well!

commented

Thank you for the bug report, yes there are these three commands you could try to run in order:

execute as @e[type=minecraft:marker,tag=ts.dl.light] at @s if block ~ ~ ~ minecraft:light[waterlogged=true] run fill ~ ~ ~ ~ ~ ~ minecraft:water replace light
execute as @e[type=minecraft:marker,tag=ts.dl.light] at @s if block ~ ~ ~ minecraft:light[waterlogged=false] run fill ~ ~ ~ ~ ~ ~ minecraft:air replace light
kill @e[type=minecraft:marker,tag=ts.dl.light]

These are the ones also listed in the wiki. However, I'm not sure if this will fix your problem, since stray light blocks should be removed automatically when Dynamic Lights is installed.

What version of Dynamic Lights did you use when this happened?

commented

The last version I used on my server was 1.7.1, not sure when the stray lights appeared, but I probably encountered the first ones around 6 month ago when I started benchmarking all my datapacks.

Thanks so much for the commands!
I was unable to find these commands/information on the wiki, I tried locating those several times; I still can not locate them there.

If you are interested, I can whitelist you on the server. But I guess that is not too interesting for you, - but you can have a look yourself if you want to; we are in the same timezone.

I will create a backups now and wait, locating some stray lights and taking notes.

commented

I see that's why I wanted to ask, since 6 months ago only v1.6 was out and maybe updating to v1.7 or v1.7.1 could have been the issue. I'll take a look at that.

Whitelisting me isn't really needed, if the commands happen to not work, the marker entities won't be there either for me to look at, but thanks for the offer.

The commands are hidden under a dropdown, the last sentence on the page Home. Admittedly, they are pretty hidden ๐Ÿ˜…

commented

the commands did not remove the lights. I will try to investigate further, and report back.

commented

Well, it seems to be working again. I'd still be interested if anything unusual happened right before you noticed the light blocks (unusual server stop, updated dynamic lights, ...) to prevent this from happening again.

Sometimes when the server halts or freezes when it is super laggy, we see that there are lights left from before the server froze, and thanks to a despawn plugin we have, it basically kills the marker that dynamic lights places.

commented

Ah, I see, would you mind telling me the name of the plugin? Maybe there's a tag or something I can add to the markers so they're ignored

commented

Hi, I'm having the same issue on a multiplayer server, it has caused multiple farms to not function due to phantom light blocks, and the commands sent here did not remove all of them, there are probably more than 2k phantom lights after seeing a bunch of mountains, villages, and forests filled with them and I am surely not removing that, Is there a way to mass remove all of them? this would be a lengthy process to do manually
image

commented

Hi, for papermc users I have found a solution, download fawe from spigotmc and execute this as an operator
/replacenear 99999 light air
(Edit: This would be better if you either /tick freeze the server or disable the datapack first)

commented

Thanks for bringing this to my attention, glad you already found a solution that works, at least for now.
This is different from the issue that ninn had, since this time the light blocks are actually there. Have you seen any error messages related to Dynamic Lights while running the paper server (like #45), recently upgraded Dynamic Lights, or used any plugins/data packs that might interfere with it?

commented

Thanks for bringing this to my attention, glad you already found a solution that works, at least for now. This is different from the issue that ninn had, since this time the light blocks are actually there. Have you seen any error messages related to Dynamic Lights while running the paper server (like #45), recently upgraded Dynamic Lights, or used any plugins/data packs that might interfere with it?

Nope, never had done anything to mess around with any datapacks, but it seems like no new unused light blocks are on my world.

commented

Well, it seems to be working again. I'd still be interested if anything unusual happened right before you noticed the light blocks (unusual server stop, updated dynamic lights, ...) to prevent this from happening again.

commented

Ah, I see, would you mind telling me the name of the plugin? Maybe there's a tag or something I can add to the markers so they're ignored

Hi, it is called EntityTrackerFixer by Rottenbone Studios, but we added MARKER to the blacklist and it seems to keep dynamic light's markers now.

commented

Thanks, it looks like I can't add tags to my markers and the users will have to manually exclude them in the plugin config like you did. I will add this to the wiki