The bug
First described in this reddit post
Opening the player inventory showing the recipe book (crafting table and furnace apparently do not cause the bug) after using a beacon crashes the game.
[^(1.13-pre2) crash-2018-06-18_01.21.34-client.txt]
Description: Unexpected error
java.lang.ClassCastException: atk cannot be cast to aue
at cor.a(SourceFile:39)
at cop.f(SourceFile:84)
at cop.a(SourceFile:73)
at coo.d(SourceFile:190)
at coo.a(SourceFile:114)
at coo.a(SourceFile:78)
at cnw.c(SourceFile:54)
at cmk.a(SourceFile:311)
at cit.a(SourceFile:725)
at cit.au(SourceFile:1334)
at cit.m(SourceFile:1216)
at cit.c(SourceFile:787)
at cit.a(SourceFile:379)
at net.minecraft.client.main.Main.main(SourceFile:144)
How to reproduce
Build a level 1 beacon
Give yourself for example an iron ingot
Switch to Survival
Open your inventory and open the recipe book
Close your inventory while the recipe book is open
Open the beacon GUI, select an effect and use the iron ingot
Close the beacon GUI
Try to open your inventory
→ ❌ The game crashes
Partial code analysis
It looks like the last method calls would be roughly (parameters and method bodies have changed slightly) the following in MCP 9.40:
Stacktrace
net.minecraft.client.gui.recipebook.GuiButtonRecipe.init(RecipeList, RecipeBookPage, RecipeBook)
net.minecraft.client.gui.recipebook.RecipeBookPage.updateButtonsForPage()
net.minecraft.client.gui.recipebook.RecipeBookPage.updateLists(List<RecipeList>, boolean)
net.minecraft.client.gui.recipebook.GuiRecipeBook.updateCollections(boolean)
net.minecraft.client.gui.recipebook.GuiRecipeBook.initVisuals(boolean, InventoryCrafting)
net.minecraft.client.gui.recipebook.GuiRecipeBook.func_194303_a(int, int, Minecraft, boolean, InventoryCrafting)
net.minecraft.client.gui.inventory.GuiInventory.initGui()
cor.a (1.13-pre2)
public void a(cos cos2, cop cop2) {
this.r = cos2;
this.p = (aue)cop2.d().g.bD;
this.q = cop2.e();
List<ayx> list = cos2.a(this.q.a(this.p));
for (ayx ayx2 : list) {
if (!this.q.d(ayx2)) continue;
cop2.a(list);
this.t = 15.0f;
break;
}
}
Obfuscated code (1.13-pre2) | Deobfuscated |
---|---|
|
|
|
|
This suggests that after closing the beacon GUI the container is not reset.
Note that you need to actually use an ingot/change an effect in the beacon; simply opening it will not cause the crash.