Chisels & Bits - For Forge

Chisels & Bits - For Forge

108M Downloads

Bug when using Chisels and bits + Better Portals

Panduso opened this issue ยท 2 comments

commented

Hello! i discovered a bug with the mod BetterPortals and Chisels and bits.
When i had the mod better portals and chisels and bits, after placing and removing a few bits i couldn't interact with doors, place normal blocks or destroy blocks
please fix this bug or try to.

better portals: https://www.curseforge.com/minecraft/mc-mods/betterportals

MC Version: 1.12.2
C&B Version: 14.33
Do You have Optifine: No

Thanks

commented

I'll close this issue as wontfix as this won't be fixed in 1.12 as 1.12 is no longer receiving updates. This issue should be fixed in 1.14 as packets are no longer sent from RenderWorldLastEvent.

commented

To reproduce, draw a region of bits. Make sure that at the start no portal is being rendered but when you finish one is being rendered (the reason that's relevant should become obvious after reading below explanation).

For anyone looking to fix this:

BetterPortals discards any packets sent from the client on any world except the one which has the main player in it. In particular, this means sending packets concerning the main player during RenderWorldLastEvent is a no-go since it's called for all rendered worlds in no guaranteed order.

This specific issue (it probably isn't the only one) happens because the packets sent here may get discarded depending on the order in which the worlds are rendered:
https://github.com/AlgorithmX2/Chisels-and-Bits/blob/1d7309e06dec869d12e97e648133b57f6e91f067/src/main/java/mod/chiselsandbits/core/ClientSide.java#L1007-L1014

Also note that BP 0.2.6 will have a workaround which passes any packets sent from the mods.chiselsandbits.network.NetworkRouter class through regardless of the world they were sent in. This may cause other issues but I'd hope those are less severe than the other way around.
So, make sure to either use BP 0.2.5 or temporarily rename the NetworkRouter class to reproduce the issue.

For reference: Johni0702/BetterPortals#213