Celestial gateway bug, cannot place/interact after teleportation
LaTrissTitude opened this issue ยท 10 comments
My friends and I are playing with the FTB revelation mod pack (unmodified 1.4.0 version) and the bug arises when we use a celestial gate to another world. When we do so we can still destroy blocks but cannot interact or craft anything anymore until we disconnect and reconnect
Forge version: 14.23.1.2601
minecraft version: 1.12.2
mod version included in the modpack: astralsorcery-1.12.2-1.8.4
No log or errors thrown I can remember of.
To add more details, the first gate is in the overworld and the second one is in the simple void world dimension.
1.8.5 had a large number of bugfixes covering instances similar to this. Please update and verify if still an issue.
Done, updated manually and the bug is still there, still cannot interact with crafting tables or blocks after a teleportation via celestial gate..
Found a fix when trying to open the astral book, the client seems to remember the shift key of the sneaking needed to teleport even after the teleportation if you release it during the loading screen.
It causes you to have to re press shift to re-trigger the key release event correctly, even though the game considers you are not sneaking as the key is not really pressed, so you walk at normal speed. But can't interact with blocks.
The problem seems to be located around the teleportation initiation event.
It just moves you.
And vanilla has that issue on its own with how the game recognizes key inputs.
At least thrres another piece figured out.
Mhmm, it sure seems so... Have not modded minecraft for a while, is there no way to de-sneak the player before the teleportation? What Forge docs is really the worst, can't find any valuable info about the current API content on the interweb..
I just parsed a bit your code by curiosity, nothing seems wrong in the ClientGatewayHandler class, except a bit of code duplication and the fact that I do not need to use my use item button to trigger the teleportation, so
!Minecraft.getMinecraft().gameSettings.keyBindUseItem.isKeyDown()
seems to always be true when sneaking, potentially making it redundant with player.isSneaking(), but I may have misunderstood the condition ^^' potential bug over here
Can't find a way to find any other mod using sneaking as part of the teleportation process to find a potential workaround, aroma being closed source.. My guess would be to have to rework the TP conditions, e.g. either by mounting on a "static gateway" which would force the player to dismount to leave the teleporter (could be quite boring fast enough and damn, it would require way too much work for such a bug), or just standing still long enough with the cross-hair on a destination to trigger it (would just need to retard the start of the warping effect ~0.4-0.6 s maybe? Or starting the preview effect when focusing a star and triggering the tp by using a wand when the tick counter is >= 95?)...
Either way, seems like the sneaking must be cancelled or avoided during the player transportation.
The way aroma did the cancelling for his portals might be interesting but you might have to ask him directly..
Sorry, I did what I could to help but I couldn't find any more potentially relevant info x)
No, my point is: MC, even with no mods, has a history of not recognizing key inputs during a world transition. Happens a lot with alt+tab and throwing items from inventories because of it.
I see it a lot on one of my two rigs involving alt+tab and MC thinking I've still got alt held down (and only MC thinks it) when I don't after coming back in if I click the window instead of alt+tabbing back in.
Yup, I do understand your point, that's why I suggested to see with aroma how he did his work around for his portal, because you can only trigger the TP by sneaking in them, and it does not have this key ghosting problem. As far as I know it's the only other teleportation related mod using sneaking as a trigger input, and he might have found a useful workaround you could use.
Otherwise as I said, the only way to avoid it would be to avoid using sneak as a trigger input
Fixed the desync of the sneaking flag as it - until 1.8.5 - gets easily desynced between server and client. In specifics: the client's sneak-flag gets cleared after teleportation, the server's flag persists, so the player is sneaking as far as the server's view is concerned and is not sneaking as the client's view is concerned.
From what i heard, bugs like key-input not fully processing has been a issue for a while in mc.
seems to always be true when sneaking, potentially making it redundant with player.isSneaking(), but I may have misunderstood the condition ^^' potential bug over here
No, that is not a bug. You can either use the teleport with shift or by holding rightclick. It's made to have both.
I see. Seems like you found a fix though, that was hella quick! I didn't know that you could just use right click, thanks for the clarification!