Fix Crafting Tree NPE (#1064)

This commit is contained in:
slprime authored and GitHub committed 2026-10-06 19:57:10 +03:00
1 parent 1e2801c891
commit 35f5400ecb
2 files changed
+6 -1

No files matched your search

@@ -198,6 +198,11 @@ public class BookmarkStorage {
final BookmarkItem item = BookmarkItem.of(parser.parse(itemStr).getAsJsonObject());
if (item != null) {
if (!grid.groups.containsKey(item.groupId)) {
item.groupId = BookmarkGrid.DEFAULT_GROUP_ID;
}
grid.addItem(item, false);
} else {
wasError = true;
@@ -162,7 +162,7 @@ public class GuiCraftingTree extends GuiContainer implements INEIGuiHandler, IGu
final ItemTreeSlot replaceNode = this.uiState.replaceRecipeNode;
this.uiState.replaceRecipeNode = null;
if (recipe != null) {
if (recipe != null && this.grid.getGroup(this.groupId) != null) {
final RecipeId recipeId = recipe.getRecipeId();
boolean changed = false;