Closed 1keponchem closed 4 months ago
It looks like this is a bug on Powah's side, even if the dev closed the issue I think they should re-open it. They've got an bug that's messing up the chunk serialization process, and it's causing any other mod (be it Crossroads or Integrated Dynamics) that relies on it to fail.
As you can see from the stack trace, BeamRenderTE is causing the chunk to be loaded again while it is unloading. Which means that two instances of the chunk get loaded at the same time, hence Powah complains. The correct fix is to make sure this doesn't happen.
I've investigated this issue with @1keponchem I don't know much about Minecraft modding, so my claim below may be wrong.
According to below stacktrace, BeamRenderTE.setRemoved
(m7651) indirectly calls CableTile.clearRemoved
(m6339).
This should be wrong.
at com.Da_Technomancer.crossroads.api.beams.BeamUtil.rayTraceBeamSimple(BeamUtil.java:129) ~[crossroads-1.19.2-2.9.5.jar%23158!/:1.19.2-2.9.5]
at com.Da_Technomancer.crossroads.api.beams.BeamHelper.emit(BeamHelper.java:37) ~[crossroads-1.19.2-2.9.5.jar%23158!/:1.19.2-2.9.5]
at com.Da_Technomancer.crossroads.api.templates.BeamRenderTE.m_7651_(BeamRenderTE.java:214) ~[crossroads-1.19.2-2.9.5.jar%23158!/:1.19.2-2.9.5]
Caused by: java.lang.RuntimeException: Cable added to position BlockPos{x=11, y=-60, z=-6}, but there was already one there?
at owmii.powah.block.cable.CableNet.addCable(CableNet.java:23) ~[Powah-4.0.11.jar%23160!/:?]
at owmii.powah.block.cable.CableTile.m_6339_(CableTile.java:44) ~[Powah-4.0.11.jar%23160!/:?]
This issue may affects not only Powah.
Below is screenshot of broken light level in chunks which Crossroads beam used.
There are no Powah machines.
I haven't investigated this well because there are too many mods.
But I'm pretty sure that this issue causing this.
clearRemoved is called because the chunk is being loaded again. That is the root cause.
Describe the bug Newly created world fails to save with some setups using the mod "Powah!" The log says "Failed to save chunk." The setups are included in a below section. This seems to be related with loading unloaded chunks, because similar issues exist: https://github.com/CyclopsMC/IntegratedDynamics/issues/1257 https://github.com/Technici4n/Powah/issues/90#issuecomment-1606226823 Concidering those issues, I thought it might be better to submit an issue here rather than Powah!'s repository.
To Reproduce [Optional] This procedure is only tested in singleplayer. I'm not sure if it works on a server.
Expected behavior [Optional] The created world appears in the GUI
Screenshots [Optional]
![2024-02-17_22 20 59](https://github.com/Crossroads-Development/Crossroads/assets/88263340/13fb0882-1b94-43b7-8106-9c38018b923e)
Additional context [Optional] Minecraft 1.19.2 Forge: 43.3.8 Mod Versions:
log: 2024-02-17-1.log