diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/moe/nea/firmament/mixins/custommodels/PatchArmorTexturesInGenderMod.java | 38 | ||||
-rw-r--r-- | src/main/kotlin/Firmament.kt | 3 |
2 files changed, 3 insertions, 38 deletions
diff --git a/src/main/java/moe/nea/firmament/mixins/custommodels/PatchArmorTexturesInGenderMod.java b/src/main/java/moe/nea/firmament/mixins/custommodels/PatchArmorTexturesInGenderMod.java deleted file mode 100644 index 68b07c1..0000000 --- a/src/main/java/moe/nea/firmament/mixins/custommodels/PatchArmorTexturesInGenderMod.java +++ /dev/null @@ -1,38 +0,0 @@ - -package moe.nea.firmament.mixins.custommodels; - -import com.llamalad7.mixinextras.injector.wrapoperation.Operation; -import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; -import com.llamalad7.mixinextras.sugar.Local; -import com.wildfire.render.GenderArmorLayer; -import moe.nea.firmament.features.texturepack.CustomGlobalArmorOverrides; -import net.minecraft.item.ArmorItem; -import net.minecraft.item.ArmorMaterial; -import net.minecraft.item.ItemStack; -import net.minecraft.registry.entry.RegistryEntry; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Pseudo; -import org.spongepowered.asm.mixin.injection.At; - -@Mixin(GenderArmorLayer.class) -@Pseudo -public class PatchArmorTexturesInGenderMod { - @WrapOperation(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/item/ArmorItem;getMaterial()Lnet/minecraft/registry/entry/RegistryEntry;")) - private RegistryEntry<ArmorMaterial> replaceArmorMaterial(ArmorItem instance, Operation<RegistryEntry<ArmorMaterial>> original, @Local ItemStack chestplate) { - var entry = original.call(instance); - var overrides = CustomGlobalArmorOverrides.overrideArmor(chestplate); - if (overrides == null) - return entry; - var material = entry.value(); - return RegistryEntry.of(new ArmorMaterial( - material.defense(), - material.enchantability(), - material.equipSound(), - material.repairIngredient(), - overrides, - material.toughness(), - material.knockbackResistance() - )); - } -} diff --git a/src/main/kotlin/Firmament.kt b/src/main/kotlin/Firmament.kt index d8a309b..e0541f1 100644 --- a/src/main/kotlin/Firmament.kt +++ b/src/main/kotlin/Firmament.kt @@ -28,6 +28,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.plus +import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.json.Json import kotlinx.serialization.json.decodeFromStream import kotlin.coroutines.EmptyCoroutineContext @@ -59,9 +60,11 @@ object Firmament { } val version: Version by lazy { metadata.version } + @OptIn(ExperimentalSerializationApi::class) val json = Json { prettyPrint = DEBUG isLenient = true + allowTrailingComma = true ignoreUnknownKeys = true encodeDefaults = true } |