Isolate CIT resewn compat

This commit is contained in:
Linnea Gräf
2024-09-12 13:34:11 +02:00
parent ab809e197f
commit 52623b715d
8 changed files with 103 additions and 12 deletions

View File

@@ -1,4 +1,4 @@
package moe.nea.firmament.util
package moe.nea.firmament.compat.citresewn
import java.lang.invoke.MethodHandles
import java.util.function.BiPredicate
@@ -7,6 +7,7 @@ import shcm.shsupercm.fabric.citresewn.defaults.cit.conditions.ConditionNBT
object ConditionNBTMixin {
class Helper<StringMatcher> {
// TODO: make lambdametafactory work by way of modifying the actual modifiers
val stringMatcherType = ConditionNBT::class.java.getDeclaredField("matchString").type

View File

@@ -1,6 +1,4 @@
package moe.nea.firmament.mixins;
// People are complaining but this really is not my place to fix things
package moe.nea.firmament.mixins.compat.citresewn;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
@@ -9,8 +7,8 @@ import com.llamalad7.mixinextras.sugar.ref.LocalRef;
import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import com.mojang.serialization.DynamicOps;
import moe.nea.firmament.compat.citresewn.ConditionNBTMixin;
import moe.nea.firmament.features.texturepack.CustomSkyBlockTextures;
import moe.nea.firmament.util.ConditionNBTMixin;
import net.minecraft.component.ComponentType;
import net.minecraft.component.DataComponentTypes;
import net.minecraft.component.type.NbtComponent;
@@ -30,6 +28,8 @@ import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup;
import shcm.shsupercm.fabric.citresewn.pack.format.PropertyKey;
import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue;
// People are complaining but this really is not my place to fix things
@Mixin(ConditionComponents.class)
@Pseudo
public class MixinConditionComponents {

View File

@@ -21,5 +21,8 @@ interface SubscriptionList {
}
.toList()
}
init {
require(allLists.isNotEmpty())
}
}
}

View File

@@ -47,7 +47,9 @@
"fabric": "*",
"fabric-language-kotlin": ">=${fabric_kotlin_version}",
"minecraft": ">=${minecraft_version}",
"roughlyenoughitems": ">=${rei_version}"
"roughlyenoughitems": ">=${rei_version}",
"cloth-config": "*",
"architectury": "*"
},
"custom": {
"configured": {
@@ -62,7 +64,8 @@
},
"mc-publish": {
"dependencies": [
"roughlyenoughitems{modrinth:rei}"
"roughlyenoughitems{modrinth:rei}",
"architectury{modrinth:architectury-api}"
]
}
}