From 2ffeef1c1711c5a0f7b6f71e6e16979175093102 Mon Sep 17 00:00:00 2001 From: ev chang Date: Mon, 1 Jul 2024 06:20:43 +0900 Subject: [PATCH] Fix injectors for SBA / SkyHanni compat mixins --- .../polyblur/mixin/SBAEntityOutlineRendererMixin.java | 5 +++-- .../polyblur/mixin/SkyHanniEntityOutlineRendererMixin.java | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/polyfrost/polyblur/mixin/SBAEntityOutlineRendererMixin.java b/src/main/java/org/polyfrost/polyblur/mixin/SBAEntityOutlineRendererMixin.java index b0d909f..ad10fe9 100644 --- a/src/main/java/org/polyfrost/polyblur/mixin/SBAEntityOutlineRendererMixin.java +++ b/src/main/java/org/polyfrost/polyblur/mixin/SBAEntityOutlineRendererMixin.java @@ -1,12 +1,13 @@ package org.polyfrost.polyblur.mixin; +import net.minecraft.client.renderer.culling.ICamera; import org.polyfrost.polyblur.blurs.monkey.MonkeyBlur; import org.spongepowered.asm.mixin.Dynamic; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Pseudo @Mixin(targets = "codes.biscuit.skyblockaddons.features.EntityOutlines.EntityOutlineRenderer") @@ -14,7 +15,7 @@ public class SBAEntityOutlineRendererMixin { @Dynamic("SBA") @Inject(method = "renderEntityOutlines", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/shader/Framebuffer;bindFramebuffer(Z)V", ordinal = 3, shift = At.Shift.AFTER, remap = true), remap = false) - private void onRenderEntityOutlinesPre(CallbackInfo ci) { + private static void onRenderEntityOutlinesPre(ICamera camera, float partialTicks, double x, double y, double z, CallbackInfoReturnable ci) { MonkeyBlur.instance.bindFb(); } } diff --git a/src/main/java/org/polyfrost/polyblur/mixin/SkyHanniEntityOutlineRendererMixin.java b/src/main/java/org/polyfrost/polyblur/mixin/SkyHanniEntityOutlineRendererMixin.java index 4ec59d1..b107bf0 100644 --- a/src/main/java/org/polyfrost/polyblur/mixin/SkyHanniEntityOutlineRendererMixin.java +++ b/src/main/java/org/polyfrost/polyblur/mixin/SkyHanniEntityOutlineRendererMixin.java @@ -1,12 +1,14 @@ package org.polyfrost.polyblur.mixin; +import net.minecraft.client.renderer.culling.ICamera; import org.polyfrost.polyblur.blurs.monkey.MonkeyBlur; import org.spongepowered.asm.mixin.Dynamic; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Pseudo; import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Coerce; import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; @Pseudo @Mixin(targets = "at.hannibal2.skyhanni.utils.EntityOutlineRenderer") @@ -14,7 +16,7 @@ public class SkyHanniEntityOutlineRendererMixin { @Dynamic("SkyHanni") @Inject(method = "renderEntityOutlines", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/shader/Framebuffer;bindFramebuffer(Z)V", ordinal = 3, shift = At.Shift.AFTER, remap = true), remap = false) - private void onRenderEntityOutlinesPre(CallbackInfo ci) { + private static void onRenderEntityOutlinesPre(ICamera camera, float partialTicks, @Coerce Object a, CallbackInfoReturnable ci) { MonkeyBlur.instance.bindFb(); } }