mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-16 18:54:45 +00:00
Fix WorldClient leak after leaving the world (#1115)
This commit is contained in:
1 parent
9839d1d08f
commit
fbbeafcd79
5 files changed
+42
-12
No files matched your search
@@ -137,7 +137,11 @@ public class ItemCraftablesPanel
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
pendingResult.set(generateCraftables(ItemCraftablesPanel.this.pendingSnapshot));
|
||||
final CraftablesSnapshot snapshot = ItemCraftablesPanel.this.pendingSnapshot;
|
||||
|
||||
if (snapshot != null) {
|
||||
pendingResult.set(generateCraftables(snapshot));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -298,6 +302,11 @@ public class ItemCraftablesPanel
|
||||
}
|
||||
}
|
||||
|
||||
public void clearGuiReferences() {
|
||||
this.lastGuiContainer = null;
|
||||
this.pendingSnapshot = null;
|
||||
}
|
||||
|
||||
private GuiContainer getGuiContainer() {
|
||||
final GuiContainer firstGui = NEIClientUtils.getGuiContainer();
|
||||
return (firstGui instanceof GuiRecipe<?>gui) ? gui.firstGui : firstGui;
|
||||
|
||||
Reference in new issue
Block a user