From 4c04ceb7ee4e9b532f3677c1424433e0e3955a08 Mon Sep 17 00:00:00 2001 From: SHsuperCM Date: Wed, 21 Jun 2023 12:59:48 +0300 Subject: Added 1.19.4 port --- .../defaults/mixin/types/enchantment/ItemRendererMixin.java | 8 ++++---- .../defaults/mixin/types/enchantment/RenderPhaseAccessor.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'defaults/src/main/java') 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 909c2f4..f5cdc70 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 @@ -49,8 +49,8 @@ public class ItemRendererMixin { cir.setReturnValue(vertexConsumer); } - @Inject(method = "getDynamicDisplayGlintConsumer", cancellable = true, at = @At("RETURN")) - private static void citresewn$enchantment$getCompassGlintConsumer(VertexConsumerProvider provider, RenderLayer layer, MatrixStack.Entry entry, CallbackInfoReturnable cir) { + @Inject(method = /*? <1.20 {?*//*"getCompassGlintConsumer"/*?} else {?*/"getDynamicDisplayGlintConsumer"/*?}?*/, cancellable = true, at = @At("RETURN")) + private static void citresewn$enchantment$getDynamicDisplayGlintConsumer(VertexConsumerProvider provider, RenderLayer layer, MatrixStack.Entry entry, CallbackInfoReturnable cir) { if (!CONTAINER.shouldApply()) return; VertexConsumer vertexConsumer = TypeEnchantment.GlintRenderLayer.GLINT.tryApply(null, layer, provider); @@ -58,8 +58,8 @@ public class ItemRendererMixin { cir.setReturnValue(VertexConsumers.union(new OverlayVertexConsumer(vertexConsumer, entry.getPositionMatrix(), entry.getNormalMatrix(), 1f), cir.getReturnValue())); } - @Inject(method = "getDirectDynamicDisplayGlintConsumer", cancellable = true, at = @At("RETURN")) - private static void citresewn$enchantment$getDirectCompassGlintConsumer(VertexConsumerProvider provider, RenderLayer layer, MatrixStack.Entry entry, CallbackInfoReturnable cir) { + @Inject(method = /*? <1.20 {?*//*"getDirectCompassGlintConsumer"/*?} else {?*/"getDirectDynamicDisplayGlintConsumer"/*?}?*/, cancellable = true, at = @At("RETURN")) + private static void citresewn$enchantment$getDirectDynamicDisplayGlintConsumer(VertexConsumerProvider provider, RenderLayer layer, MatrixStack.Entry entry, CallbackInfoReturnable cir) { if (!CONTAINER.shouldApply()) return; VertexConsumer vertexConsumer = TypeEnchantment.GlintRenderLayer.DIRECT_GLINT.tryApply(null, layer, provider); diff --git a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/RenderPhaseAccessor.java b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/RenderPhaseAccessor.java index 01b382f..c845309 100644 --- a/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/RenderPhaseAccessor.java +++ b/defaults/src/main/java/shcm/shsupercm/fabric/citresewn/defaults/mixin/types/enchantment/RenderPhaseAccessor.java @@ -17,5 +17,5 @@ public interface RenderPhaseAccessor { @Accessor("EQUAL_DEPTH_TEST") static RenderPhase.DepthTest EQUAL_DEPTH_TEST() { throw new RuntimeException(); } @Accessor("COLOR_MASK") static RenderPhase.WriteMaskState COLOR_MASK() { throw new RuntimeException(); } @Accessor("VIEW_OFFSET_Z_LAYERING") static RenderPhase.Layering VIEW_OFFSET_Z_LAYERING() { throw new RuntimeException(); } - @Accessor("ITEM_ENTITY_TARGET") static RenderPhase.Target ITEM_ENTITY_TARGET() { throw new RuntimeException(); } + @Accessor(/*? <1.20 {?*//*"ITEM_TARGET"/*?} else {?*/"ITEM_ENTITY_TARGET"/*?}?*/) static RenderPhase.Target ITEM_ENTITY_TARGET() { throw new RuntimeException(); } } -- cgit