Skip to content

Commit

Permalink
Fix injectors for SBA / SkyHanni compat mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Jun 30, 2024
1 parent 0c3ed9b commit 2ffeef1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
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")
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<Boolean> ci) {
MonkeyBlur.instance.bindFb();
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
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")
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<Boolean> ci) {
MonkeyBlur.instance.bindFb();
}
}

0 comments on commit 2ffeef1

Please sign in to comment.