-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix injectors for SBA / SkyHanni compat mixins
- Loading branch information
Showing
2 changed files
with
7 additions
and
4 deletions.
There are no files selected for viewing
5 changes: 3 additions & 2 deletions
5
src/main/java/org/polyfrost/polyblur/mixin/SBAEntityOutlineRendererMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
6 changes: 4 additions & 2 deletions
6
src/main/java/org/polyfrost/polyblur/mixin/SkyHanniEntityOutlineRendererMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |