diff options
author | inglettronald <inglettronald@gmail.com> | 2023-04-02 15:10:08 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-04-02 15:10:08 -0500 |
commit | d8ea98a5ee14df50283185865f84166db2cff5af (patch) | |
tree | 21523a90e96c3502f02fe531dfa27b64768ffe1b /src | |
parent | a84928b1b9248800cd6f8bb8a831b0a04dd3fc39 (diff) | |
download | DulkirMod-d8ea98a5ee14df50283185865f84166db2cff5af.tar.gz DulkirMod-d8ea98a5ee14df50283185865f84166db2cff5af.tar.bz2 DulkirMod-d8ea98a5ee14df50283185865f84166db2cff5af.zip |
Option to turn off armor glint
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/dulkirmod/mixins/MixinLayerArmorBase.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/main/java/dulkirmod/mixins/MixinLayerArmorBase.java b/src/main/java/dulkirmod/mixins/MixinLayerArmorBase.java new file mode 100644 index 0000000..7bacf5b --- /dev/null +++ b/src/main/java/dulkirmod/mixins/MixinLayerArmorBase.java @@ -0,0 +1,21 @@ +package dulkirmod.mixins; + +import dulkirmod.config.DulkirConfig; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.entity.layers.LayerArmorBase; +import net.minecraft.client.renderer.entity.layers.LayerRenderer; +import net.minecraft.entity.EntityLivingBase; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(LayerArmorBase.class) +public abstract class MixinLayerArmorBase<T extends ModelBiped> implements LayerRenderer<EntityLivingBase> { + @Inject(method = "renderGlint", at = @At("HEAD"), cancellable = true) + private void renderGlintOverride(CallbackInfo ci) { + if (DulkirConfig.INSTANCE.getCancelArmorGlint()) + ci.cancel(); + } + +} |