From 242b2eeb42faf6fad155b8b3bcab9dd3eaff643e Mon Sep 17 00:00:00 2001 From: TexTrue <3140846162@qq.com> Date: Tue, 10 Oct 2023 11:18:46 +0800 Subject: [PATCH] move to DM-Earth Edition --- build.gradle | 12 ++++------ gradle.properties | 14 +++++------ jitpack.yml | 2 ++ .../CREIBFModMixinConfigPlugin.java | 23 ------------------- .../inject/CrushingCategoryInject.java | 2 +- .../inject/MillingCategoryInject.java | 2 +- .../mixin/AssemblySpoutingMixin.java | 6 +---- .../mixin/BasinCategoryMixin.java | 8 +------ .../mixin/CreateDisplayMixin.java | 5 ---- .../mixin/CrushingCategoryMixin.java | 5 ---- .../mixin/MillingCategoryMixin.java | 5 ---- .../mixin/SequencedAssemblyRecipeMixin.java | 5 ---- .../createreibugfix/utils/REICreateUtils.java | 4 ++-- .../resources/createreibugfix.mixins.json | 1 - src/main/resources/fabric.mod.json | 13 +++++++---- 15 files changed, 27 insertions(+), 80 deletions(-) create mode 100644 jitpack.yml delete mode 100644 src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java diff --git a/build.gradle b/build.gradle index 9632925..c769620 100644 --- a/build.gradle +++ b/build.gradle @@ -20,7 +20,6 @@ repositories { maven { url = "https://maven.shedaniel.me/" } // Cloth Config, REI maven { url = "https://jitpack.io/" } // Mixin Extras, Fabric ASM maven { url = "https://maven.jamieswhiteshirt.com/libs-release" } // Reach Entity Attributes - maven { url = "https://maven.quiltmc.org/repository/release" } // QM maven { url = "https://maven.parchmentmc.org" } // Parchment } @@ -31,14 +30,13 @@ dependencies { modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" - modImplementation("com.simibubi.create:create-fabric-${project.minecraft_version}:${project.create_version}") { - exclude(Map.of("module", "forge-config-api-port-fabric-547434")) - exclude(group: "io.github.fabricators_of_create") - } + //modImplementation("com.simibubi.create:create-fabric-${project.minecraft_version}:${project.create_version}") { + // exclude(Map.of("module", "forge-config-api-port-fabric-547434")) + // exclude(group: "io.github.fabricators_of_create") + //} + modImplementation "maven.modrinth:create-fabric-dme-edition:${project.create_version}" modImplementation "io.github.fabricators_of_create.Porting-Lib:Porting-Lib:${project.portinglib_version}" - modLocalRuntime "maven.modrinth:forge-config-api-port:${project.forgeconfigapiport_version}" - include(modImplementation("com.github.Fallen-Breath:conditional-mixin:${project.conditionalmixin_version}")) modImplementation "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}" } diff --git a/gradle.properties b/gradle.properties index 2c74b42..d2284b6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,15 +10,13 @@ org.gradle.parallel=true loader_version=0.14.17 # Mod Properties - mod_version=0.1.0-create0.5.1-mc1.20.x - maven_group=ho.artisan.createreibugfix + mod_version=0.1.0-mc1.20.1 + maven_group=dm.earth.createreibugfix archives_base_name=CreateFabricREIBugFix # Dependencies - fabric_version=0.88.1+1.20.1 + fabric_version=0.89.3+1.20.1 - rei_version=12.0.652 - forgeconfigapiport_version=v8.0.0-1.20.1-Fabric - create_version=0.5.1-d-build.1161+mc1.20.1 - portinglib_version=2.1.1127+1.20 - conditionalmixin_version=v0.3.2 + rei_version=12.0.665 + create_version=0.5.1-d-build.9+mc1.20.1 + portinglib_version=2.1.1148+1.20-entity-refactor diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 0000000..1e41e00 --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk17 \ No newline at end of file diff --git a/src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java b/src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java deleted file mode 100644 index 7bed03e..0000000 --- a/src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java +++ /dev/null @@ -1,23 +0,0 @@ -package ho.artisan.createreibugfix; - -import me.fallenbreath.conditionalmixin.api.mixin.RestrictiveMixinConfigPlugin; - -import java.util.List; -import java.util.Set; - -public class CREIBFModMixinConfigPlugin extends RestrictiveMixinConfigPlugin { - @Override - public String getRefMapperConfig() { - return null; - } - - @Override - public void acceptTargets(Set myTargets, Set otherTargets) { - - } - - @Override - public List getMixins() { - return null; - } -} diff --git a/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java b/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java index 65e613d..3cc0954 100644 --- a/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java +++ b/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java @@ -30,7 +30,7 @@ import ho.artisan.createreibugfix.utils.REICreateUtils; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; diff --git a/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java b/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java index 0991e0f..d6562b4 100644 --- a/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java +++ b/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java @@ -27,7 +27,7 @@ import com.simibubi.create.compat.rei.display.CreateDisplay; import com.simibubi.create.content.kinetics.crusher.AbstractCrushingRecipe; -import io.github.fabricators_of_create.porting_lib.util.FluidStack; +import io.github.fabricators_of_create.porting_lib.fluids.FluidStack; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java index 940b6eb..7ef3d03 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java @@ -27,7 +27,6 @@ import com.simibubi.create.content.processing.sequenced.SequencedRecipe; import ho.artisan.createreibugfix.utils.REICreateUtils; -import ho.artisan.createreibugfix.utils.StringUtils; import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.gui.widgets.Widget; @@ -35,9 +34,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; - import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArg; @@ -45,7 +41,7 @@ import org.spongepowered.asm.mixin.injection.invoke.arg.Args; import java.util.List; -@Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) + @Mixin(ReiSequencedAssemblySubCategory.AssemblySpouting.class) @Environment(EnvType.CLIENT) public class AssemblySpoutingMixin { diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java index 34cf583..8af22cc 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java @@ -29,7 +29,6 @@ import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.utility.Pair; -import ho.artisan.createreibugfix.utils.StringUtils; import ho.artisan.createreibugfix.utils.REICreateUtils; import me.shedaniel.math.Point; @@ -45,9 +44,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; - import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; @@ -56,10 +52,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - import java.util.List; -@Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) @Mixin(BasinCategory.class) @Environment(EnvType.CLIENT) public class BasinCategoryMixin { @@ -67,7 +61,7 @@ public class BasinCategoryMixin { private final ThreadLocal fluidIngredient = new ThreadLocal<>(); @Inject(method = "addWidgets", at = @At(value = "INVOKE", target = "Lme/shedaniel/rei/api/common/util/EntryIngredients;of(Ldev/architectury/fluid/FluidStack;)Lme/shedaniel/rei/api/common/entry/EntryIngredient;", ordinal = 0, remap = false), locals = LocalCapture.CAPTURE_FAILHARD, remap = false) - private void captureVars(CreateDisplay display, List widgets, Point origin, CallbackInfo ci, BasinRecipe recipe, DefaultedList fluidIngredients, List> ingredients, List itemOutputs, DefaultedList fluidOutputs, int size, int xOffset, int yOffset, int i, int j) { + private void captureVars(CreateDisplay display, List widgets, Point origin, CallbackInfo ci, BasinRecipe recipe, DefaultedList fluidIngredients, List> ingredients, List itemOutputs, DefaultedList fluidOutputs, int size, int xOffset, int yOffset, int i, int j) { fluidIngredient.set(fluidIngredients.get(j)); } diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java index 5d79e17..b5b1a66 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java @@ -26,21 +26,16 @@ import com.simibubi.create.compat.rei.display.CreateDisplay; import ho.artisan.createreibugfix.inject.CreateDisplayInject; -import ho.artisan.createreibugfix.utils.StringUtils; import me.shedaniel.rei.api.common.category.CategoryIdentifier; import net.minecraft.recipe.Recipe; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; - import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyArgs; import org.spongepowered.asm.mixin.injection.invoke.arg.Args; -@Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) @Mixin(CreateDisplay.class) public abstract class CreateDisplayMixin { @ModifyArgs(method = "(Lnet/minecraft/recipe/Recipe;Lme/shedaniel/rei/api/common/category/CategoryIdentifier;)V", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/compat/rei/display/CreateDisplay;(Lnet/minecraft/recipe/Recipe;Lme/shedaniel/rei/api/common/category/CategoryIdentifier;Ljava/util/List;Ljava/util/List;)V")) diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java index 9ec4724..b088c14 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java @@ -29,7 +29,6 @@ import com.simibubi.create.content.processing.recipe.ProcessingOutput; import ho.artisan.createreibugfix.inject.CrushingCategoryInject; -import ho.artisan.createreibugfix.utils.StringUtils; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; @@ -40,9 +39,6 @@ import org.objectweb.asm.Opcodes; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; - import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -52,7 +48,6 @@ import java.util.List; -@Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) @Mixin(CrushingCategory.class) @Environment(EnvType.CLIENT) public class CrushingCategoryMixin { diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java index d9221ff..c958019 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java @@ -29,7 +29,6 @@ import com.simibubi.create.content.processing.recipe.ProcessingOutput; import ho.artisan.createreibugfix.inject.MillingCategoryInject; -import ho.artisan.createreibugfix.utils.StringUtils; import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; @@ -38,9 +37,6 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; - import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -49,7 +45,6 @@ import java.util.List; -@Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) @Mixin(MillingCategory.class) @Environment(EnvType.CLIENT) public abstract class MillingCategoryMixin { diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java index 6eb2005..77e6789 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java @@ -26,19 +26,14 @@ import com.simibubi.create.content.processing.recipe.ProcessingOutput; import com.simibubi.create.content.processing.sequenced.SequencedAssemblyRecipe; -import ho.artisan.createreibugfix.utils.StringUtils; import ho.artisan.createreibugfix.inject.SequencedAssemblyRecipeInject; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; - import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import java.util.List; -@Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) @Mixin(SequencedAssemblyRecipe.class) public abstract class SequencedAssemblyRecipeMixin implements SequencedAssemblyRecipeInject.Interface { @Final diff --git a/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java b/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java index 3183135..537a398 100644 --- a/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java +++ b/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java @@ -147,12 +147,12 @@ public static EntryIngredient ingredientOf(@NotNull FluidIngredient fluidIngredi @author Phoupraw */ @Contract(pure = true) - public static @NotNull List resultsOf(@NotNull List rollableResults, @NotNull DefaultedList fluidResults) { + public static @NotNull List resultsOf(@NotNull List rollableResults, @NotNull DefaultedList fluidResults) { List list = new LinkedList<>(); for (ProcessingOutput rollableResult : rollableResults) { list.add(EntryIngredients.of(rollableResult.getStack().copy())); } - for (io.github.fabricators_of_create.porting_lib.util.FluidStack fluidResult : fluidResults) { + for (io.github.fabricators_of_create.porting_lib.fluids.FluidStack fluidResult : fluidResults) { list.add(EntryIngredients.of(FluidStack.create(fluidResult.getFluid(), fluidResult.getAmount(), fluidResult.getTag()))); } return list; diff --git a/src/main/resources/createreibugfix.mixins.json b/src/main/resources/createreibugfix.mixins.json index f837a86..fdf5dc6 100644 --- a/src/main/resources/createreibugfix.mixins.json +++ b/src/main/resources/createreibugfix.mixins.json @@ -3,7 +3,6 @@ "minVersion": "0.8", "package": "ho.artisan.createreibugfix.mixin", "compatibilityLevel": "JAVA_17", - "plugin": "ho.artisan.createreibugfix.CREIBFModMixinConfigPlugin", "mixins": [ "SequencedAssemblyRecipeMixin" ], diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index ac93367..6f0c03f 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,15 +1,18 @@ { "schemaVersion": 1, - "id": "createreibugfix", + "id": "createreibugfix_dme", "version": "${version}", - "name": "CreateFabric&REIBugFix", + "name": "CreateFabric&REIBugFix DM-Earth Edition", "description": "Fix CreateFabric Recipe display on REI issues. Code from Create's Delight by Phoupraw.", "authors": [ - "TexTrue, HO-Artisan, Phoupraw" + "DM-Earth", + "TexTrue", + "HO-Artisan", + "Phoupraw" ], "contact": { - "homepage": "https://github.com/HO-Artisan/Create-REIBugFix", - "sources": "https://github.com/HO-Artisan/Create-REIBugFix" + "homepage": "https://github.com/DM-Earth/create-fabric-rei-fix-dme-edition", + "sources": "https://github.com/DM-Earth/create-fabric-rei-fix-dme-edition" }, "license": "MIT", "icon": "assets/createreibugfix/icon.png",