From d8ea98a5ee14df50283185865f84166db2cff5af Mon Sep 17 00:00:00 2001 From: inglettronald Date: Sun, 2 Apr 2023 15:10:08 -0500 Subject: Option to turn off armor glint --- .../java/dulkirmod/mixins/MixinLayerArmorBase.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/dulkirmod/mixins/MixinLayerArmorBase.java (limited to 'src') 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 implements LayerRenderer { + @Inject(method = "renderGlint", at = @At("HEAD"), cancellable = true) + private void renderGlintOverride(CallbackInfo ci) { + if (DulkirConfig.INSTANCE.getCancelArmorGlint()) + ci.cancel(); + } + +} -- cgit