Re-enable REI integration

This commit is contained in:
Jonathan Coates committed 2026-06-15 23:32:22 +01:00
1 parent 5403b7070b
commit 06abd03e9f
5 files changed
+25 -17

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@
# MC version is specified in gradle.properties, as we need that in settings.gradle.
# Remember to update corresponding versions in fabric.mod.json/neoforge.mods.toml
fabric-api = "0.146.1+26.1.2"
fabric-loader = "0.18.4"
fabric-loader = "0.19.3"
neoForge = "26.1.2.29-beta"
neoMergeTool = "2.0.0"
mixin = "0.8.5"
@@ -37,7 +37,7 @@ iris-fabric = "1.9.1+1.21.7-fabric"
iris-forge = "1.9.1+1.21.7-neoforge"
jei = "29.5.0.26"
modmenu = "16.0.0-rc.1"
rei = "18.0.800"
rei = "26.1.818"
sodium-fabric = "mc1.21.11-0.8.0-fabric"
sodium-forge = "mc1.21.11-0.8.0-neoforge"
mixinExtra = "0.3.5"
@@ -305,7 +305,7 @@ public interface PlatformHelper {
/**
* This result was not handled, and should be handled by the caller.
*
* @param block Whether the block may be used ({@link BlockState#use(Level, Player, InteractionHand, BlockHitResult)}).
* @param block Whether the block may be used ({@link BlockState#useItemOn(ItemStack, Level, Player, InteractionHand, BlockHitResult)}).
* @param item Whether the item may be used on the block ({@link ItemStack#useOn(UseOnContext)}).
* @see ServerPlayerGameMode#useItemOn(ServerPlayer, Level, ItemStack, InteractionHand, BlockHitResult)
*/
+14 -6
View File
@@ -19,11 +19,6 @@ cct {
allProjects.forEach { externalSources(it) }
}
sourceSets {
main { java.exclude("dan200/computercraft/shared/integration/rei") }
client { java.exclude("dan200/computercraft/client/integration/rei") }
}
fun addRemappedConfiguration(name: String) {
configurations.create(name) {
isCanBeConsumed = false
@@ -58,6 +53,19 @@ configurations {
}
compileClasspath { extendsFrom(localImplementation.get()) }
runtimeClasspath { extendsFrom(localImplementation.get()) }
configureEach {
resolutionStrategy.dependencySubstitution {
all {
val requested = requested
// Architectury only publishes a "dev" jar. For might want to fix that in our maven, but for now fixup
// Gradle resolution.
if (requested is ModuleComponentSelector && requested.group == "dev.architectury" && requested.module == "architectury") {
artifactSelection { selectArtifact("jar", null, "dev") }
}
}
}
}
}
dependencies {
@@ -127,7 +135,7 @@ loom {
generateRunConfig = true
ideConfigFolder = "Fabric"
property("fabric-tag-conventions-v2.missingTagTranslationWarning", "VERBOSE")
systemProperties.put("fabric-tag-conventions-v2.missingTagTranslationWarning", "VERBOSE")
}
named("client") {
@@ -12,7 +12,7 @@ import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes;
import me.shedaniel.rei.api.common.util.EntryIngredients;
import me.shedaniel.rei.plugin.common.displays.crafting.CraftingDisplay;
import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCustomShapedDisplay;
import net.minecraft.world.item.crafting.display.ShapedCraftingRecipeDisplay;
import net.minecraft.world.item.ItemStackTemplate;
import java.util.List;
import java.util.Optional;
@@ -33,13 +33,13 @@ class UpgradeDisplayGenerator implements DynamicDisplayGenerator<CraftingDisplay
return entry.getType() == VanillaEntryTypes.ITEM ? Optional.of(resolver.findRecipesWithInput(entry.castValue())) : Optional.empty();
}
private static CraftingDisplay makeDisplay(ShapedCraftingRecipeDisplay recipe) {
private static CraftingDisplay makeDisplay(int width, int height, List<ItemStackTemplate> ingredients, ItemStackTemplate result) {
return new DefaultCustomShapedDisplay(
EntryIngredients.ofSlotDisplays(recipe.ingredients()),
List.of(EntryIngredients.ofSlotDisplay(recipe.result())),
ingredients.stream().map(EntryIngredients::of).toList(),
List.of(EntryIngredients.of(result)),
Optional.empty(),
recipe.width(),
recipe.height()
width,
height
);
}
}
@@ -46,8 +46,8 @@
}
],
"depends": {
"fabricloader": ">=0.18.3",
"fabric-api": ">=0.140.0",
"fabricloader": ">=0.19.3",
"fabric-api": ">=0.146.1",
"minecraft": "~26.1.2"
},
"accessWidener": "computercraft.accesswidener"