diff --git a/Changelog.md b/Changelog.md index dd339b8..5779d72 100644 --- a/Changelog.md +++ b/Changelog.md @@ -43,6 +43,10 @@ - Started looking for modules in `variants-cit`, marked `variant-cits` as deprecated. ### 2.5.1 - Updated for MC 1.21.2 +## 2.6 ### 2.6.0 - Added the modules `bucket_entity_data`, `entity_data` and `block_entity_data`. - Added `bucket_entity_age` model predicate. +### 2.6.1 +- Fixed rendering of triden in hand. + diff --git a/gradle.properties b/gradle.properties index a0d53b0..06f4568 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,6 +12,6 @@ loader_version=0.16.7 fabric_version=0.106.1+1.21.3 # Mod Properties -mod_version=2.6.0 +mod_version=2.6.1 maven_group=fr.estecka.variantscit archives_base_name=variants-cit diff --git a/src/main/java/fr/estecka/variantscit/mixin/ItemRendererMixin.java b/src/main/java/fr/estecka/variantscit/mixin/ItemRendererMixin.java index fae131d..9419766 100644 --- a/src/main/java/fr/estecka/variantscit/mixin/ItemRendererMixin.java +++ b/src/main/java/fr/estecka/variantscit/mixin/ItemRendererMixin.java @@ -16,6 +16,7 @@ import net.minecraft.client.render.model.BakedModelManager; import net.minecraft.client.util.ModelIdentifier; import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; import fr.estecka.variantscit.IItemModelProvider; import fr.estecka.variantscit.VariantsCitMod; @@ -41,7 +42,10 @@ private BakedModel GetVariantModel(BakedModelManager modelManager, ItemStack sta // Most items @WrapOperation( method="getModel", require=1, at=@At( value="INVOKE", target="net/minecraft/client/render/item/ItemModels.getModel (Lnet/minecraft/item/ItemStack;)Lnet/minecraft/client/render/model/BakedModel;") ) private BakedModel GetItemStackModel(ItemModels models, ItemStack stack, Operation original) { - return GetVariantModel(bakedModelManager, stack, ()->original.call(models, stack)); + if (stack.isOf(Items.TRIDENT)) + return original.call(models, stack); + else + return GetVariantModel(bakedModelManager, stack, ()->original.call(models, stack)); } // Trident and Spyglass