From 397f2eaef58a1c5255de3414293e073bf92787e7 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 20 Sep 2026 14:22:56 +0000 Subject: [PATCH] Update to Minecraft 26.3 * Replace the removed org.lwjgl.glfw key constants with InputConstants * SlotDisplay.TagSlotDisplay now takes a HolderSet instead of a TagKey, and Ingredient#display() wraps plain item sets in it as well, so an actual tag is only recognized via HolderSet#unwrapKey * Level#potionBrewing is gone, brewing reagents are now a recipe property set * Replace the deprecated logoFile with iconFile Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01V35MFZ7JSgoLe79J4d1uxf --- build.gradle | 2 +- gradle.properties | 12 ++++++------ ...nerScreenPartInterfaceCraftingAttunedOffsets.java | 4 ++-- ...ContainerScreenPartInterfaceCraftingSettings.java | 4 ++-- .../CraftingProcessOverrideBrewingStand.java | 3 ++- .../gametest/GameTestHelpersIntegratedCrafting.java | 5 +++-- .../recipe/type/RecipeDeadBush.java | 3 ++- src/main/resources/META-INF/neoforge.mods.toml | 2 +- 8 files changed, 19 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 5e1a50588..6c774cb25 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'net.neoforged.moddev' version '2.0.141' + id 'net.neoforged.moddev' version '2.0.147' id 'net.darkhax.curseforgegradle' version '1.1.28' id 'com.github.kt3k.coveralls' version '2.12.0' id 'com.diffplug.spotless' version '7.2.1' diff --git a/gradle.properties b/gradle.properties index f8e552f97..9ae5c954c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ group=org.cyclops.integratedcrafting java_version=25 # Common -minecraft_version=26.2 +minecraft_version=26.3 mod_name=IntegratedCrafting mod_author=rubensworks (aka kroeser) mod_id=integratedcrafting @@ -19,7 +19,7 @@ curseforge_project_id=287357 modrinth_project_id=qwpACdla # NeoForge -neoforge_version=26.2.0.6-beta +neoforge_version=26.3.0.7-beta neoforge_loader_version_range=[4,) neoforge_update_json_url=https://raw.githubusercontent.com/CyclopsMC/Versions/master/neoforge_update/integrated-crafting.json @@ -31,7 +31,7 @@ org.gradle.configuration-cache=true org.gradle.configureondemand=true # Dependencies -cyclopscore_version=1.30.0-1143 -integrateddynamics_version=1.33.4-2125 -commoncapabilities_version=2.11.8-360 -integratedtunnels_version=1.9.6-639 +cyclopscore_version=1.30.0-1159 +integrateddynamics_version=1.33.4-2157 +commoncapabilities_version=2.11.8-398 +integratedtunnels_version=1.9.6-795 diff --git a/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedOffsets.java b/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedOffsets.java index 0a69643cb..6d0b65d7d 100644 --- a/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedOffsets.java +++ b/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingAttunedOffsets.java @@ -6,7 +6,7 @@ import org.cyclops.integratedcrafting.inventory.container.ContainerPartInterfaceCraftingAttunedOffsets; import org.cyclops.integrateddynamics.core.client.gui.container.ContainerScreenPartOffset; import org.cyclops.integrateddynamics.core.inventory.container.ContainerPartOffset; -import org.lwjgl.glfw.GLFW; +import com.mojang.blaze3d.platform.InputConstants; /** * Offsets gui for the attuned crafting interface. @@ -25,7 +25,7 @@ public ContainerScreenPartInterfaceCraftingAttunedOffsets(ContainerPartInterface @Override public boolean keyPressed(KeyEvent keyEvent) { - if (keyEvent.key() == GLFW.GLFW_KEY_ESCAPE) { + if (keyEvent.key() == InputConstants.KEY_ESCAPE) { // Don't close all guis, but go back to the gui of the part. exitToPartGui(); return true; diff --git a/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingSettings.java b/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingSettings.java index 9d57a176e..05575deea 100644 --- a/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingSettings.java +++ b/src/main/java/org/cyclops/integratedcrafting/client/gui/ContainerScreenPartInterfaceCraftingSettings.java @@ -28,7 +28,7 @@ import org.cyclops.integrateddynamics.core.client.gui.WidgetTextFieldDropdown; import org.cyclops.integrateddynamics.core.client.gui.container.ContainerScreenPartSettings; import org.cyclops.integrateddynamics.core.inventory.container.ContainerPartSettings; -import org.lwjgl.glfw.GLFW; +import com.mojang.blaze3d.platform.InputConstants; import java.util.Arrays; import java.util.List; @@ -162,7 +162,7 @@ public boolean charTyped(CharacterEvent evt) { @Override public boolean keyPressed(KeyEvent evt) { - if (evt.key() != GLFW.GLFW_KEY_ESCAPE) { + if (evt.key() != InputConstants.KEY_ESCAPE) { if (this.numberFieldChannelInterfaceCrafting.keyPressed(evt)) { return true; } diff --git a/src/main/java/org/cyclops/integratedcrafting/core/crafting/processoverride/CraftingProcessOverrideBrewingStand.java b/src/main/java/org/cyclops/integratedcrafting/core/crafting/processoverride/CraftingProcessOverrideBrewingStand.java index 373c0b3ed..b7f58ae8f 100644 --- a/src/main/java/org/cyclops/integratedcrafting/core/crafting/processoverride/CraftingProcessOverrideBrewingStand.java +++ b/src/main/java/org/cyclops/integratedcrafting/core/crafting/processoverride/CraftingProcessOverrideBrewingStand.java @@ -2,6 +2,7 @@ import net.minecraft.core.Direction; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.RecipePropertySet; import net.minecraft.world.level.block.entity.BrewingStandBlockEntity; import net.neoforged.neoforge.capabilities.Capabilities; import net.neoforged.neoforge.transfer.ResourceHandler; @@ -62,7 +63,7 @@ public boolean craft(Function, PartPos> targetGetter, int ingredientSlotIndex = 0; int bottleSlotIndex = 0; for (ItemStack instance : instances) { - if (tile.getLevel().potionBrewing().isIngredient(instance)) { + if (tile.getLevel().recipeAccess().propertySet(RecipePropertySet.BREWING_REAGENTS).test(instance)) { // The instance is for the ingredient slot int inserted; try (var tx = Transaction.openRoot()) { diff --git a/src/main/java/org/cyclops/integratedcrafting/gametest/GameTestHelpersIntegratedCrafting.java b/src/main/java/org/cyclops/integratedcrafting/gametest/GameTestHelpersIntegratedCrafting.java index ea36400da..cbda93d64 100644 --- a/src/main/java/org/cyclops/integratedcrafting/gametest/GameTestHelpersIntegratedCrafting.java +++ b/src/main/java/org/cyclops/integratedcrafting/gametest/GameTestHelpersIntegratedCrafting.java @@ -204,13 +204,14 @@ public static IRecipeDefinition createRecipeDefinition(Level level, RecipeType { // This is a bit hacky, see VanillaRecipeTypeRecipeHandler for a better implementation. // First check if the ingredient is a tag. + // TagSlotDisplay also carries direct item sets, so only a named holder set is an actual tag. String tag = null; if (ingredientSlot >= 0 && slot >= 0) { RecipeDisplay display = recipeCrafting.display().get(0); if (display instanceof ShapelessCraftingRecipeDisplay displayCrafting && displayCrafting.ingredients().get(ingredientSlot) instanceof SlotDisplay.TagSlotDisplay slotTag) { - tag = slotTag.tag().location().toString(); + tag = slotTag.tag().unwrapKey().map(tagKey -> tagKey.location().toString()).orElse(null); } else if (display instanceof ShapedCraftingRecipeDisplay displayCrafting && slot < displayCrafting.ingredients().size() && displayCrafting.ingredients().get(slot) instanceof SlotDisplay.TagSlotDisplay slotTag) { - tag = slotTag.tag().location().toString(); + tag = slotTag.tag().unwrapKey().map(tagKey -> tagKey.location().toString()).orElse(null); } } diff --git a/src/main/java/org/cyclops/integratedcrafting/recipe/type/RecipeDeadBush.java b/src/main/java/org/cyclops/integratedcrafting/recipe/type/RecipeDeadBush.java index 91af9ab55..d450ee69b 100644 --- a/src/main/java/org/cyclops/integratedcrafting/recipe/type/RecipeDeadBush.java +++ b/src/main/java/org/cyclops/integratedcrafting/recipe/type/RecipeDeadBush.java @@ -71,7 +71,8 @@ public PlacementInfo placementInfo() { @Override public List display() { return List.of(new ShapelessCraftingRecipeDisplay( - List.of(new SlotDisplay.TagSlotDisplay(ItemTags.SAPLINGS), new SlotDisplay.TagSlotDisplay(Tags.Items.TOOLS_SHEAR)), + List.of(new SlotDisplay.TagSlotDisplay(BuiltInRegistries.ITEM.getOrThrow(ItemTags.SAPLINGS)), + new SlotDisplay.TagSlotDisplay(BuiltInRegistries.ITEM.getOrThrow(Tags.Items.TOOLS_SHEAR))), new SlotDisplay.ItemSlotDisplay(Items.DEAD_BUSH), new SlotDisplay.ItemSlotDisplay(Items.CRAFTING_TABLE) )); diff --git a/src/main/resources/META-INF/neoforge.mods.toml b/src/main/resources/META-INF/neoforge.mods.toml index c9dcec902..5df076dc5 100644 --- a/src/main/resources/META-INF/neoforge.mods.toml +++ b/src/main/resources/META-INF/neoforge.mods.toml @@ -3,7 +3,7 @@ loaderVersion="${neoforge_loader_version_range}" issueTrackerURL="${issue_tracker_url}" displayURL="${display_url}" license="${license}" -logoFile="logo.png" +iconFile="logo.png" authors="${mod_author}" [[mods]] modId="${mod_id}"