Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Commit

Permalink
move to DM-Earth Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Oct 10, 2023
1 parent 1431e54 commit 242b2ee
Show file tree
Hide file tree
Showing 15 changed files with 27 additions and 80 deletions.
12 changes: 5 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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}"
}

Expand Down
14 changes: 6 additions & 8 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions jitpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
jdk:
- openjdk17

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,21 @@
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;

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;
import org.spongepowered.asm.mixin.injection.ModifyArgs;
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -56,18 +52,16 @@
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 {
@Unique
private final ThreadLocal<FluidIngredient> 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<BasinRecipe> display, List<Widget> widgets, Point origin, CallbackInfo ci, BasinRecipe recipe, DefaultedList<FluidIngredient> fluidIngredients, List<Pair<Ingredient, MutableInt>> ingredients, List<ItemStack> itemOutputs, DefaultedList<io.github.fabricators_of_create.porting_lib.util.FluidStack> fluidOutputs, int size, int xOffset, int yOffset, int i, int j) {
private void captureVars(CreateDisplay<BasinRecipe> display, List<Widget> widgets, Point origin, CallbackInfo ci, BasinRecipe recipe, DefaultedList<FluidIngredient> fluidIngredients, List<Pair<Ingredient, MutableInt>> ingredients, List<ItemStack> itemOutputs, DefaultedList<io.github.fabricators_of_create.porting_lib.fluids.FluidStack> fluidOutputs, int size, int xOffset, int yOffset, int i, int j) {
fluidIngredient.set(fluidIngredients.get(j));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<init>(Lnet/minecraft/recipe/Recipe;Lme/shedaniel/rei/api/common/category/CategoryIdentifier;)V", at = @At(value = "INVOKE", target = "Lcom/simibubi/create/compat/rei/display/CreateDisplay;<init>(Lnet/minecraft/recipe/Recipe;Lme/shedaniel/rei/api/common/category/CategoryIdentifier;Ljava/util/List;Ljava/util/List;)V"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -52,7 +48,6 @@

import java.util.List;

@Restriction(conflict = @Condition(StringUtils.createsdelight_modid))
@Mixin(CrushingCategory.class)
@Environment(EnvType.CLIENT)
public class CrushingCategoryMixin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -49,7 +45,6 @@

import java.util.List;

@Restriction(conflict = @Condition(StringUtils.createsdelight_modid))
@Mixin(MillingCategory.class)
@Environment(EnvType.CLIENT)
public abstract class MillingCategoryMixin {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ public static EntryIngredient ingredientOf(@NotNull FluidIngredient fluidIngredi
@author Phoupraw
*/
@Contract(pure = true)
public static @NotNull List<EntryIngredient> resultsOf(@NotNull List<ProcessingOutput> rollableResults, @NotNull DefaultedList<io.github.fabricators_of_create.porting_lib.util.FluidStack> fluidResults) {
public static @NotNull List<EntryIngredient> resultsOf(@NotNull List<ProcessingOutput> rollableResults, @NotNull DefaultedList<io.github.fabricators_of_create.porting_lib.fluids.FluidStack> fluidResults) {
List<EntryIngredient> 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;
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/createreibugfix.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"minVersion": "0.8",
"package": "ho.artisan.createreibugfix.mixin",
"compatibilityLevel": "JAVA_17",
"plugin": "ho.artisan.createreibugfix.CREIBFModMixinConfigPlugin",
"mixins": [
"SequencedAssemblyRecipeMixin"
],
Expand Down
13 changes: 8 additions & 5 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 242b2ee

Please sign in to comment.