[Bug]: issue with wired redstone and its LibNetworkStack packets
dadoirie opened this issue ยท 5 comments
Describe the bug you're experiencing
Blocks visibility from Wired Redstone are not being sent to the player - regardless if dedicated server or singleplayer
The circuits still work, but they are invisible ... and player only can pass through the wires - whereby the Redstone Diode (wiredredstone:gate_diode
) - and most likely other non-wires - has a glitchy collision where the screen shakes when player comes in contact with that block - which is invisible because of the missing data
Reproducability
place anything from wired redstone - move a few chunks away - exit world - enter world & go to the spot where the blocks are placed
expected behavior:
actual behavior:
server
singleplayer
Mod up to date
- Before submitting this issue I updated to the newest version and reproduced it
Minecraft version
1.20.1
Modloader version
Fabric
Logs
https://mclo.gs/MQLBfU4 (they don't tell much tho)
I don't see any good ways to fix this. The ideal solution would be if FAPI had an event for when a chunk is to be sent to the client. That way you could just invoke that event when a delayed chunk is sent.
One potential solution would be to involve ThreadedChunkManager.sendChunkDataPackets
when a chunk is actually being sent, as this is where most mods hook in to send custom chunk data. But I can imagine that being difficult.
Also just wondering, how does this mod affect the net.minecraftforge.event.level.ChunkWatchEvent.Watch
event on Forge?
From what I can tell from the javadoc, that event is basically a hook into the method I mentioned before.
it just delays the packet to the client: https://github.com/someaddons/chunksending/blob/1.20.1/src/main/java/com/chunksending/mixin/ChunkHolderMixin.java
you could either change your logic to use the broadcast to send chunk data packets for indirect compat. (Could probably also rework the odd external sync to a normal BE based system/sync). Alternatively you can also add a compatibility patch in your mod yourself and when chunksending is present instead of sendinging it directly you queue it to the player through IChunksendingPlayer
interface