The bug
Unlike all other GUIs, you can open the advancements overview while traveling to the nether or back.
In singleplayer, the game is paused then while in multiplayer, the game continues to run, causing the advancements overview to be closed as soon as you've changed the dimension.
How to reproduce
Enter a portal
Press the "Advancements overview" key (default:
L
)
Code analysis
In class EntityPlayerSP
, in function onLivingUpdate
, it is defined that a screen's doesGuiPauseGame
function must return false
if it should not be able to be shown.
If that function is implemented into GuiScreenAdvancements
like so:
GuiScreenAdvancements.java
public boolean doesGuiPauseGame()
{
return false;
}
the overview can not be invoked while the player is inside of a portal. However, this also causes the overview to disappear when you open it from the pause menu while standing inside of a portal; and also the game does not stop while being in the advancements overview, which probably is not intended.
Linked issues
Attachments
Comments 16
Since the game determines whether or not a GUI can be opened while standing inside of a nether portal by checking if the GUI pauses the game, this might be intended as the advancements GUI screen (intentionally) pauses the game. However, if this is not intended and the advancements GUI screen really is the only game-pausing GUI screen which shouldn't be possible to open inside of a nether portal, the simplest and least game-breaking fix IMO would be to add this exception to the if-statement in net.minecraft.client.entity.EntityPlayerSP.onLivingUpdate()
.
net.minecraft.client.entity.EntityPlayerSP.onLivingUpdate()
public void onLivingUpdate()
{
// ...
if (this.inPortal)
{
if (this.mc.currentScreen != null && (!this.mc.currentScreen.doesGuiPauseGame() || this.mc.currentScreen instanceof GuiScreenAdvancements))
{
this.mc.displayGuiScreen((GuiScreen)null);
}
// ...
}
// ...
}
The code analysis and suggested fix is misleading in my opinion.
It is likely the case that you spent much time in the advancement GUI when you look through all the advancements and I assume you would appreciate to not be blown up by a sneaky creeper while doing that.
Whether or not a GUI can be used should either be determined by a different method or this report is invalid.