diff options
14 files changed, 29 insertions, 36 deletions
diff --git a/Changelog.md b/Changelog.md index 0ed1cf9..11b16f8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,4 +1,3 @@ - - Updated to 1.19.3! This update does not work in 1.19.2! - - Fixed legacy for the old "bow_standby" specification + - Updated to 1.19.4 (snapshot of 1.20) -2023 means 1.19.3! Sorry for the delay everyone! Thank you for your patience! Hopefully Mojank doesn't screw us over again with 1.19.4 :aware:
\ No newline at end of file +Thank you @MeeniMc 🙏
\ No newline at end of file diff --git a/build.gradle b/build.gradle index b64bf84..1d89958 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import java.nio.file.Files plugins { - id 'fabric-loom' version '1.0-SNAPSHOT' apply false + id 'fabric-loom' version '1.1-SNAPSHOT' apply false id 'io.shcm.shsupercm.fabric.fletchingtable' version '1.5' apply false id 'com.modrinth.minotaur' version '2.+' apply false id 'com.matthewprenger.cursegradle' version '1.4.0' apply false @@ -24,18 +24,18 @@ allprojects { minecraft "com.mojang:minecraft:${project.minecraft_version}" mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" - + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_api}" //fletchingTable.fungible project.fungible modCompileOnly fabricApi.module("fabric-api-base", "${project.fabric_api}") modCompileOnly fabricApi.module("fabric-resource-loader-v0", "${project.fabric_api}") modCompileOnly fabricApi.module("fabric-command-api-v2", "${project.fabric_api}") - modCompileOnly("com.terraformersmc:modmenu:${project.modmenu}") { + modImplementation("com.terraformersmc:modmenu:${project.modmenu}") { exclude(group: "net.fabricmc.fabric-api") } - modCompileOnly("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") { + modImplementation("me.shedaniel.cloth:cloth-config-fabric:${project.cloth}") { exclude(group: "net.fabricmc.fabric-api") } } diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeArmor.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeArmor.java index b1abbd4..9a4c988 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeArmor.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeArmor.java @@ -12,7 +12,6 @@ import net.minecraft.util.Identifier; import shcm.shsupercm.fabric.citresewn.api.CITTypeContainer; import shcm.shsupercm.fabric.citresewn.cit.*; import shcm.shsupercm.fabric.citresewn.defaults.cit.conditions.ConditionItems; -import shcm.shsupercm.fabric.citresewn.cit.CITParsingException; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyKey; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue; diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java index a0fcc06..57fa8de 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeElytra.java @@ -11,7 +11,6 @@ import net.minecraft.util.Identifier; import shcm.shsupercm.fabric.citresewn.api.CITTypeContainer; import shcm.shsupercm.fabric.citresewn.cit.*; import shcm.shsupercm.fabric.citresewn.defaults.cit.conditions.ConditionItems; -import shcm.shsupercm.fabric.citresewn.cit.CITParsingException; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyKey; diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeEnchantment.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeEnchantment.java index 6e20ad8..1c56b44 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeEnchantment.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeEnchantment.java @@ -16,13 +16,11 @@ import shcm.shsupercm.fabric.citresewn.defaults.cit.conditions.ConditionEnchantm import shcm.shsupercm.fabric.citresewn.defaults.config.CITResewnDefaultsConfig; import shcm.shsupercm.fabric.citresewn.defaults.mixin.types.enchantment.BufferBuilderStorageAccessor; import shcm.shsupercm.fabric.citresewn.defaults.mixin.types.enchantment.RenderPhaseAccessor; -import shcm.shsupercm.fabric.citresewn.cit.CITParsingException; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyKey; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue; import shcm.shsupercm.util.logic.Loops; -import blue.endless.jankson.annotation.Nullable; import java.lang.ref.WeakReference; import java.util.*; import java.util.function.Consumer; @@ -152,7 +150,7 @@ public class TypeEnchantment extends CITType { } @Override - public void globalProperty(String key, @Nullable PropertyValue value) throws Exception { + public void globalProperty(String key, PropertyValue value) throws Exception { switch (key) { case "useGlint" -> { globalUseGlint = value == null ? true : Boolean.parseBoolean(value.value()); diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java index 1d2cc8b..2e6e0c7 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/cit/types/TypeItem.java @@ -25,7 +25,6 @@ import shcm.shsupercm.fabric.citresewn.cit.*; import shcm.shsupercm.fabric.citresewn.defaults.cit.conditions.ConditionItems; import shcm.shsupercm.fabric.citresewn.defaults.common.ResewnItemModelIdentifier; import shcm.shsupercm.fabric.citresewn.defaults.mixin.types.item.JsonUnbakedModelAccessor; -import shcm.shsupercm.fabric.citresewn.cit.CITParsingException; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyGroup; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyKey; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue; diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/ItemRendererMixin.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/ItemRendererMixin.java index 1d27326..5367762 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/ItemRendererMixin.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/ItemRendererMixin.java @@ -5,6 +5,7 @@ import net.minecraft.client.render.*; import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; @@ -27,14 +28,14 @@ public class ItemRendererMixin { CONTAINER.setContext(new CITContext(stack, world, entity)); } - @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("HEAD")) - private void citresewn$enchantment$startApplyingItem(ItemStack stack, ModelTransformation.Mode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci) { + @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformationMode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("HEAD")) + private void citresewn$enchantment$startApplyingItem(ItemStack stack, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci) { if (CONTAINER.active()) CONTAINER.apply(); } - @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("RETURN")) - private void citresewn$enchantment$stopApplyingItem(ItemStack stack, ModelTransformation.Mode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci) { + @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformationMode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("RETURN")) + private void citresewn$enchantment$stopApplyingItem(ItemStack stack, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci) { if (CONTAINER.active()) CONTAINER.setContext(null); } diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ItemRendererMixin.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ItemRendererMixin.java index 5f59329..dcc3d71 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ItemRendererMixin.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/item/ItemRendererMixin.java @@ -5,6 +5,7 @@ import net.minecraft.client.render.item.ItemModels; import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.render.model.BakedModel; import net.minecraft.client.render.model.json.ModelTransformation; +import net.minecraft.client.render.model.json.ModelTransformationMode; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; @@ -55,12 +56,12 @@ public class ItemRendererMixin { } } - @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformation$Mode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("HEAD")) - private void citresewn$fixMojankCITsContext(ItemStack stack, ModelTransformation.Mode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci) { + @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformationMode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("HEAD")) + private void citresewn$fixMojankCITsContext(ItemStack stack, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci) { if (!CONTAINER.active() || citresewn$mojankCITModel == null) return; - if (renderMode == ModelTransformation.Mode.GUI || renderMode == ModelTransformation.Mode.GROUND || renderMode == ModelTransformation.Mode.FIXED) + if (renderMode == ModelTransformationMode.GUI || renderMode == ModelTransformationMode.GROUND || renderMode == ModelTransformationMode.FIXED) ((TypeItem.BakedModelManagerMixinAccess) this.models.getModelManager()).citresewn$forceMojankModel(citresewn$mojankCITModel.get()); citresewn$mojankCITModel = null; diff --git a/gradle.properties b/gradle.properties index fbffc94..8ea9e90 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,15 +3,15 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.19.3 -publish_minecraft_versions=1.19.3 -yarn_mappings=1.19.3+build.4 -loader_version=0.14.12 -fungible=1.2+mc1.19.2 +minecraft_version=1.19.4 +publish_minecraft_versions=1.19.4 +yarn_mappings=1.19.4+build.1 +loader_version=0.14.17 +fungible=1.2+mc1.19.3 -fabric_api=0.69.1+1.19.3 -modmenu=5.0.2 -cloth=9.0.94 +fabric_api=0.76.0+1.19.4 +modmenu=6.1.0-rc.4 +cloth=10.0.96 # Mod Properties mod_version=1.1.3 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index aa991fc..da1db5f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java b/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java index 6a6ec22..824c481 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/api/CITGlobalProperties.java @@ -2,8 +2,6 @@ package shcm.shsupercm.fabric.citresewn.api; import shcm.shsupercm.fabric.citresewn.pack.format.PropertyValue; -import blue.endless.jankson.annotation.Nullable; - /** * @see #globalProperty(String, PropertyValue) */ @@ -22,5 +20,5 @@ public interface CITGlobalProperties { * @param key name of the property key stripped of its modid * @param value the value it's been set to or null if resetting */ - void globalProperty(String key, @Nullable PropertyValue value) throws Exception; + void globalProperty(String key, PropertyValue value) throws Exception; } diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITContext.java b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITContext.java index 0a44915..b2df80a 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITContext.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITContext.java @@ -11,7 +11,6 @@ import net.minecraft.nbt.NbtElement; import net.minecraft.util.Identifier; import net.minecraft.world.World; -import blue.endless.jankson.annotation.Nullable; import java.util.LinkedHashMap; import java.util.Map; import java.util.Objects; @@ -33,7 +32,6 @@ public class CITContext { /** * The item's associated living entity if present. (null if not relevant) */ - @Nullable public final LivingEntity entity; /** @@ -42,7 +40,7 @@ public class CITContext { */ private Map<Identifier, Integer> enchantments = null; - public CITContext(ItemStack stack, @Nullable World world, @Nullable LivingEntity entity) { + public CITContext(ItemStack stack, World world, LivingEntity entity) { this.stack = stack; this.world = world == null ? MinecraftClient.getInstance().world : world; this.entity = entity; diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITRegistry.java b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITRegistry.java index f9512ee..2037e5e 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITRegistry.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/cit/CITRegistry.java @@ -1,6 +1,7 @@ package shcm.shsupercm.fabric.citresewn.cit; import net.fabricmc.loader.api.FabricLoader; +import net.fabricmc.loader.api.entrypoint.EntrypointContainer; import net.minecraft.util.Identifier; import shcm.shsupercm.fabric.citresewn.api.CITConditionContainer; import shcm.shsupercm.fabric.citresewn.api.CITTypeContainer; diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 66bd512..96d8759 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -23,7 +23,7 @@ "depends": { "fabric": "*", "fabricloader": "*", - "minecraft": "~1.19.3" + "minecraft": "~1.19.4" }, "recommends": { "modmenu": "*", |