From d515088e725a6434487882823363d3c6c48a9114 Mon Sep 17 00:00:00 2001 From: TexTrue <3140846162@qq.com> Date: Sat, 8 Jul 2023 16:27:06 +0800 Subject: [PATCH] 0.1.5 --- build.gradle | 2 +- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- ...ugin.java => CREIBFModMixinConfigPlugin.java} | 2 +- .../CreateFabricREIBugFixMod.java | 2 ++ .../inject/CreateDisplayInject.java | 4 ++++ .../inject/CrushingCategoryInject.java | 3 +++ .../inject/MillingCategoryInject.java | 5 +++++ .../inject/SequencedAssemblyRecipeInject.java | 1 + .../mixin/AssemblySpoutingMixin.java | 9 +++++++-- .../mixin/BasinCategoryMixin.java | 16 +++++++++++----- .../mixin/CreateDisplayMixin.java | 9 +++++++-- .../mixin/CrushingCategoryMixin.java | 14 ++++++++++---- .../mixin/MillingCategoryMixin.java | 11 ++++++++--- .../mixin/SequencedAssemblyRecipeMixin.java | 6 +++++- .../createreibugfix/utils/REICreateUtils.java | 4 ++++ src/main/resources/createreibugfix.mixins.json | 2 +- 17 files changed, 72 insertions(+), 22 deletions(-) rename src/main/java/ho/artisan/createreibugfix/{ModMixinConfiPlugin.java => CREIBFModMixinConfigPlugin.java} (84%) diff --git a/build.gradle b/build.gradle index c953d3f..86ce59f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.1-SNAPSHOT' + id 'fabric-loom' version '1.2-SNAPSHOT' id "io.github.juuxel.loom-quiltflower" version "1.+" id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index 93d7d65..50cfd98 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ org.gradle.parallel=true loader_version=0.14.17 # Mod Properties - mod_version=0.1.4-mc1.18.x + mod_version=0.1.5-create0.5.1-mc1.18.x maven_group=ho.artisan.createreibugfix archives_base_name=CreateFabricREIBugFix diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fc10b60..0c85a1f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/ho/artisan/createreibugfix/ModMixinConfiPlugin.java b/src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java similarity index 84% rename from src/main/java/ho/artisan/createreibugfix/ModMixinConfiPlugin.java rename to src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java index 853b257..7bed03e 100644 --- a/src/main/java/ho/artisan/createreibugfix/ModMixinConfiPlugin.java +++ b/src/main/java/ho/artisan/createreibugfix/CREIBFModMixinConfigPlugin.java @@ -5,7 +5,7 @@ import java.util.List; import java.util.Set; -public class ModMixinConfiPlugin extends RestrictiveMixinConfigPlugin { +public class CREIBFModMixinConfigPlugin extends RestrictiveMixinConfigPlugin { @Override public String getRefMapperConfig() { return null; diff --git a/src/main/java/ho/artisan/createreibugfix/CreateFabricREIBugFixMod.java b/src/main/java/ho/artisan/createreibugfix/CreateFabricREIBugFixMod.java index 6773438..6d98955 100644 --- a/src/main/java/ho/artisan/createreibugfix/CreateFabricREIBugFixMod.java +++ b/src/main/java/ho/artisan/createreibugfix/CreateFabricREIBugFixMod.java @@ -24,8 +24,10 @@ package ho.artisan.createreibugfix; import ho.artisan.createreibugfix.utils.StringUtils; + import net.fabricmc.api.ModInitializer; import net.fabricmc.loader.api.FabricLoader; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/src/main/java/ho/artisan/createreibugfix/inject/CreateDisplayInject.java b/src/main/java/ho/artisan/createreibugfix/inject/CreateDisplayInject.java index 46904a4..4431f41 100644 --- a/src/main/java/ho/artisan/createreibugfix/inject/CreateDisplayInject.java +++ b/src/main/java/ho/artisan/createreibugfix/inject/CreateDisplayInject.java @@ -28,12 +28,16 @@ import com.simibubi.create.content.processing.recipe.ProcessingRecipe; import com.simibubi.create.content.processing.sequenced.SequencedAssemblyRecipe; import com.simibubi.create.content.processing.sequenced.SequencedRecipe; + import me.shedaniel.rei.api.common.category.CategoryIdentifier; import me.shedaniel.rei.api.common.entry.EntryIngredient; import me.shedaniel.rei.api.common.util.EntryIngredients; + import net.minecraft.recipe.Recipe; + import org.jetbrains.annotations.ApiStatus; import org.spongepowered.asm.mixin.injection.invoke.arg.Args; + import ho.artisan.createreibugfix.utils.REICreateUtils; import java.util.LinkedList; diff --git a/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java b/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java index 65a6e28..36874e7 100644 --- a/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java +++ b/src/main/java/ho/artisan/createreibugfix/inject/CrushingCategoryInject.java @@ -27,12 +27,15 @@ import com.simibubi.create.compat.rei.category.CrushingCategory; 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 me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.gui.widgets.Widget; import me.shedaniel.rei.api.common.util.EntryStacks; import net.minecraft.util.collection.DefaultedList; + import ho.artisan.createreibugfix.utils.REICreateUtils; import java.util.List; diff --git a/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java b/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java index a8806ec..0991e0f 100644 --- a/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java +++ b/src/main/java/ho/artisan/createreibugfix/inject/MillingCategoryInject.java @@ -26,14 +26,19 @@ import com.simibubi.create.compat.rei.category.CreateRecipeCategory; 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 me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.gui.widgets.Widget; import me.shedaniel.rei.api.common.util.EntryStacks; + import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; + import net.minecraft.util.collection.DefaultedList; + import ho.artisan.createreibugfix.utils.REICreateUtils; import java.util.List; diff --git a/src/main/java/ho/artisan/createreibugfix/inject/SequencedAssemblyRecipeInject.java b/src/main/java/ho/artisan/createreibugfix/inject/SequencedAssemblyRecipeInject.java index 10fba9d..9df56b0 100644 --- a/src/main/java/ho/artisan/createreibugfix/inject/SequencedAssemblyRecipeInject.java +++ b/src/main/java/ho/artisan/createreibugfix/inject/SequencedAssemblyRecipeInject.java @@ -25,6 +25,7 @@ import com.simibubi.create.content.processing.recipe.ProcessingOutput; import com.simibubi.create.content.processing.sequenced.SequencedAssemblyRecipe; + import org.jetbrains.annotations.ApiStatus; import java.util.List; diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java index 6578058..0b4cdc9 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/AssemblySpoutingMixin.java @@ -26,14 +26,19 @@ import com.simibubi.create.compat.rei.category.sequencedAssembly.ReiSequencedAssemblySubCategory; import com.simibubi.create.content.processing.sequenced.SequencedRecipe; + import ho.artisan.createreibugfix.utils.REICreateUtils; import ho.artisan.createreibugfix.utils.StringUtils; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; + import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.gui.widgets.Widget; + 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; diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java index 4176d9d..584f2fe 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/BasinCategoryMixin.java @@ -28,19 +28,24 @@ import com.simibubi.create.content.processing.basin.BasinRecipe; import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.utility.Pair; + import ho.artisan.createreibugfix.utils.REICreateUtils; import ho.artisan.createreibugfix.utils.StringUtils; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; + import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.gui.widgets.Widget; import me.shedaniel.rei.api.common.entry.EntryIngredient; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; + import net.minecraft.item.ItemStack; import net.minecraft.recipe.Ingredient; import net.minecraft.util.collection.DefaultedList; -import org.apache.commons.lang3.mutable.MutableInt; + +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; @@ -49,6 +54,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; +import org.apache.commons.lang3.mutable.MutableInt; import java.util.List; @Restriction(conflict = @Condition(StringUtils.createsdelight_modid)) diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java index 298c2b2..5d79e17 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/CreateDisplayMixin.java @@ -24,12 +24,17 @@ package ho.artisan.createreibugfix.mixin; import com.simibubi.create.compat.rei.display.CreateDisplay; + import ho.artisan.createreibugfix.inject.CreateDisplayInject; import ho.artisan.createreibugfix.utils.StringUtils; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; + 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; diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java index bb7ef41..69ad95d 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/CrushingCategoryMixin.java @@ -27,22 +27,28 @@ import com.simibubi.create.compat.rei.display.CreateDisplay; import com.simibubi.create.content.kinetics.crusher.AbstractCrushingRecipe; import com.simibubi.create.content.processing.recipe.ProcessingOutput; + import ho.artisan.createreibugfix.utils.StringUtils; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; +import ho.artisan.createreibugfix.inject.CrushingCategoryInject; + import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.gui.widgets.Widget; + +import org.objectweb.asm.Opcodes; + import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -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; import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; -import ho.artisan.createreibugfix.inject.CrushingCategoryInject; import java.util.List; diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java index 5beaee0..cb9ea5e 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/MillingCategoryMixin.java @@ -27,20 +27,25 @@ import com.simibubi.create.compat.rei.display.CreateDisplay; import com.simibubi.create.content.kinetics.crusher.AbstractCrushingRecipe; import com.simibubi.create.content.processing.recipe.ProcessingOutput; + import ho.artisan.createreibugfix.utils.StringUtils; -import me.fallenbreath.conditionalmixin.api.annotation.Condition; -import me.fallenbreath.conditionalmixin.api.annotation.Restriction; +import ho.artisan.createreibugfix.inject.MillingCategoryInject; + import me.shedaniel.math.Point; import me.shedaniel.math.Rectangle; import me.shedaniel.rei.api.client.gui.widgets.Widget; + 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; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.LocalCapture; -import ho.artisan.createreibugfix.inject.MillingCategoryInject; import java.util.List; diff --git a/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java b/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java index d5f2605..c9a6bc8 100644 --- a/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java +++ b/src/main/java/ho/artisan/createreibugfix/mixin/SequencedAssemblyRecipeMixin.java @@ -25,13 +25,17 @@ 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 ho.artisan.createreibugfix.inject.SequencedAssemblyRecipeInject; + import java.util.List; diff --git a/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java b/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java index 36a09bc..dfce1fc 100644 --- a/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java +++ b/src/main/java/ho/artisan/createreibugfix/utils/REICreateUtils.java @@ -30,7 +30,9 @@ import com.simibubi.create.foundation.fluid.FluidIngredient; import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.utility.Pair; + import dev.architectury.fluid.FluidStack; + import me.shedaniel.math.Point; import me.shedaniel.rei.api.client.gui.widgets.Slot; import me.shedaniel.rei.api.client.gui.widgets.Widgets; @@ -38,11 +40,13 @@ import me.shedaniel.rei.api.common.entry.EntryStack; import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes; import me.shedaniel.rei.api.common.util.EntryIngredients; + import net.minecraft.item.ItemConvertible; import net.minecraft.item.ItemStack; import net.minecraft.recipe.Ingredient; import net.minecraft.recipe.Recipe; import net.minecraft.util.collection.DefaultedList; + import org.apache.commons.lang3.mutable.MutableInt; import org.jetbrains.annotations.Contract; import org.jetbrains.annotations.NotNull; diff --git a/src/main/resources/createreibugfix.mixins.json b/src/main/resources/createreibugfix.mixins.json index 45d5441..f837a86 100644 --- a/src/main/resources/createreibugfix.mixins.json +++ b/src/main/resources/createreibugfix.mixins.json @@ -3,7 +3,7 @@ "minVersion": "0.8", "package": "ho.artisan.createreibugfix.mixin", "compatibilityLevel": "JAVA_17", - "plugin": "ho.artisan.createreibugfix.ModMixinConfiPlugin", + "plugin": "ho.artisan.createreibugfix.CREIBFModMixinConfigPlugin", "mixins": [ "SequencedAssemblyRecipeMixin" ],