Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -62,7 +63,7 @@ public boolean craft(Function<IngredientComponent<?, ?>, 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()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,14 @@ public static IRecipeDefinition createRecipeDefinition(Level level, RecipeType<?
PlaceRecipeHelper.placeRecipe(width, height, recipeCrafting, recipeCrafting.placementInfo().slotsToIngredientIndex(), (ingredientSlot, slot, x, y) -> {
// 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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public PlacementInfo placementInfo() {
@Override
public List<RecipeDisplay> 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)
));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/neoforge.mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
Loading