From c307763ef5f8ec383f8089c4b23355363d225ed2 Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Tue, 12 Oct 2021 18:25:36 +0300 Subject: Cleanup --- .../citresewn/mixin/citarmor/ArmorFeatureRendererMixin.java | 6 +++--- .../citresewn/mixin/citelytra/ElytraFeatureRendererMixin.java | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/main/java/shcm/shsupercm') diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citarmor/ArmorFeatureRendererMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citarmor/ArmorFeatureRendererMixin.java index 5028d62..72a0ade 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citarmor/ArmorFeatureRendererMixin.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citarmor/ArmorFeatureRendererMixin.java @@ -25,8 +25,8 @@ import java.util.Map; public class ArmorFeatureRendererMixin, A extends BipedEntityModel> { private WeakReference> armorTexturesCached = null; - @Inject(method = "renderArmor", cancellable = true, at = @At("HEAD")) - public void renderArmor(MatrixStack matrices, VertexConsumerProvider vertexConsumers, T entity, EquipmentSlot armorSlot, int light, A model, CallbackInfo ci) { + @Inject(method = "renderArmor", at = @At("HEAD")) + private void renderArmor(MatrixStack matrices, VertexConsumerProvider vertexConsumers, T entity, EquipmentSlot armorSlot, int light, A model, CallbackInfo ci) { if (!CITResewnConfig.INSTANCE().enabled || CITResewn.INSTANCE.activeCITs == null) return; @@ -45,7 +45,7 @@ public class ArmorFeatureRendererMixin cir) { + private void getArmorTexture(ArmorItem item, boolean legs, String overlay, CallbackInfoReturnable cir) { if (armorTexturesCached == null) return; Map armorTextures = armorTexturesCached.get(); diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citelytra/ElytraFeatureRendererMixin.java b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citelytra/ElytraFeatureRendererMixin.java index 3728362..db2241e 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citelytra/ElytraFeatureRendererMixin.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/mixin/citelytra/ElytraFeatureRendererMixin.java @@ -25,8 +25,8 @@ public class ElytraFeatureRendererMixin { private WeakReference elytraItemCached = new WeakReference<>(null); private WeakReference livingEntityCached = new WeakReference<>(null); - @Inject(method = "render", cancellable = true, at = @At("HEAD")) - public void render(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LivingEntity livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { + @Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V", at = @At("HEAD")) + private void render(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LivingEntity livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { if (!CITResewnConfig.INSTANCE().enabled || CITResewn.INSTANCE.activeCITs == null) return; @@ -39,8 +39,8 @@ public class ElytraFeatureRendererMixin { this.livingEntityCached = new WeakReference<>(livingEntity); } - @Redirect(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderLayer;getArmorCutoutNoCull(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;")) - public RenderLayer getArmorCutoutNoCull(Identifier originalIdentifier) { + @Redirect(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/client/render/RenderLayer;getArmorCutoutNoCull(Lnet/minecraft/util/Identifier;)Lnet/minecraft/client/render/RenderLayer;")) + private RenderLayer getArmorCutoutNoCull(Identifier originalIdentifier) { if (!CITResewnConfig.INSTANCE().enabled || CITResewn.INSTANCE.activeCITs == null) return RenderLayer.getArmorCutoutNoCull(originalIdentifier); -- cgit