Closed belathus closed 1 year ago
Hmm, that's a weird one. You mentioned none of the chunks were chunkloaded, but I presume the lamp itself is in a loaded chunk if it was actually doing stuff while you weren't around? So then the chunks around the lamp were not chunkloaded, but the lamp itself is?
Looking at the code, there probably is more that could be done to validate chunk loaded status, but it would good to know first exactly what was loaded and what wasn't at the time of the problem.
There is one chunk loaded in the base, and it is not near the kerosene lamp; I think it'd be outside of the lamp's range, anyway.
I'll just share a screenshot from my map. I'm pretty certain the lamp is far enough away from the one loaded chunk on that island.
I've made some changes to the lamp block entity to ensure that chunks are definitely loaded before any invisible light blocks are placed or removed (these are basically air blocks which emit light). If you're in a position to test, https://github.com/TeamPneumatic/pnc-repressurized/actions/runs/3059080678 has the build (download the zip file at the bottom and extract the main JAR file).
If that doesn't help, I'm not sure what else might cause it - the lamp just places and removes blocks as necessary dependent on range and active status; it doesn't do anything fancy or unusual with chunks. But it's possible that causing lighting updates without verifying chunks are loaded could cause some weirdness?
And yes the lamp is definitely far enough away from the loaded chunk. But if the lamp itself isn't chunkloaded, it also can't be doing anything since tile entities in an unloaded chunk don't get ticked. So that's kind of confusing.
Yeah, it really is weird. I admit I really don't know exactly what was going on here, but I'll try testing that build.
This should be fixed in any recent version, closing the issue.
Describe the bug
Chunks aren't getting deleted -- they're getting moved around.
I placed a kerosene lamp down, fueled by biodiesel which was supplied by a requester frame and a logistics module, and put a daylight sensor on top of it that was inverted (emits signal at night). Set the kerosene lamp to a radius of 30 blocks, and to turn on only with a redstone signal. Then the server restarted, so I went to bed for the night.
The next time I rejoined the world on the next day, the chunks in the same region file were jumbled up. Some chunks were copied. Some were in their original locations. I had a backup of the world from a few hours before I rejoined the server, restored the backup and restarted the server. Things seemed fine then, but when the server restarted later that day, the chunks got jumbled up again. Frustrated, I played something else for a while. When I rejoined later, more chunks got moved around. It got pretty bad after leaving and rejoining a few times.
I restored the world from backup and went to work. Later on, someone asked me to restart the server, so I used SSH to stop the server from the console and got the following:
The chunks listed are all in the same region file as the kerosene lamp. None of these chunks are chunkloaded and I don't think those chunks got loaded since I had restored the world from backup.
In any case, the reason I suspect that this is the fault of the kerosene lamp is that I was able to load the chunk just fine in a single-player world, broke the kerosene lamp and daylight sensor, then uploaded it to the server, and finally the chunk corruption stopped.
Before corruption:
After Corruption (this was right after I restored from backup, so before it got really bad):
How to reproduce the bug
Screenshot of my set-up is below (except add a daylight sensor on top). The posts below the lamp are camouflaged advanced tubes with a logistics module pointing towards the lamp. The requester frame is requesting biodiesel.
Expected behavior
Chunks shouldn't be mobile.
Additional details
No response
Which Minecraft version are you using?
1.18
Which version of PneumaticCraft: Repressurized are you using?
1.18.2-6.6.4
Crash log
No response