Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(GameRenderer.class)
// priority = 500 (below the config-level 2100000000 default): must apply BEFORE Boze's own
// GameRenderer.renderLevel transform runs, or the Mth.lerp(FFF)F call site this @Redirect
// targets is already restructured by the time TrollHack's mixin scans it, crashing with
// "Redirector applyCameraTransformationsMathHelperLerpProxy ... Scanned 0 target(s)".
@Mixin(value = GameRenderer.class, priority = 500)
public abstract class MixinGameRenderer {
@Inject(
method = "render",
Expand Down Expand Up @@ -50,7 +54,7 @@ private void onShowFloatingItem(ItemStack stack, CallbackInfo ci) {
}
}

@Redirect(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;lerp(FFF)F"))
@Redirect(method = "renderLevel", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Mth;lerp(FFF)F"), require = 0)
private float applyCameraTransformationsMathHelperLerpProxy(float delta, float first, float second) {
if (NoRender.INSTANCE.isEnabled() && NoRender.INSTANCE.getNausea()) return 0;
return Mth.lerp(delta, first, second);
Expand Down