11package fi .dy .masa .tweakeroo .mixin .render ;
22
3+ import com .llamalad7 .mixinextras .injector .wrapoperation .Operation ;
4+ import com .llamalad7 .mixinextras .injector .wrapoperation .WrapOperation ;
35import org .spongepowered .asm .mixin .Mixin ;
46import org .spongepowered .asm .mixin .Shadow ;
57import org .spongepowered .asm .mixin .injection .At ;
6- import org .spongepowered .asm .mixin .injection .Redirect ;
78import net .minecraft .client .render .GameRenderer ;
89import net .minecraft .client .util .math .MatrixStack ;
910import fi .dy .masa .tweakeroo .config .Configs ;
@@ -17,13 +18,17 @@ public abstract class MixinGameRenderer_ViewBob
1718 @ Shadow
1819 protected abstract void bobView (MatrixStack matrices , float tickDelta );
1920
20- @ Redirect (method = "renderWorld" , require = 0 , at = @ At (value = "INVOKE" ,
21+ @ WrapOperation (method = "renderWorld" , require = 0 , at = @ At (value = "INVOKE" ,
2122 target = "Lnet/minecraft/client/render/GameRenderer;bobView(Lnet/minecraft/client/util/math/MatrixStack;F)V" ))
22- private void disableWorldViewBob (GameRenderer renderer , MatrixStack matrices , float tickDelta )
23+ private void disableWorldViewBob (GameRenderer renderer , MatrixStack matrices , float tickDelta , Operation < Void > original )
2324 {
2425 if (Configs .Disable .DISABLE_WORLD_VIEW_BOB .getBooleanValue () == false )
2526 {
2627 this .bobView (matrices , tickDelta );
2728 }
29+ else
30+ {
31+ original .call (renderer , matrices , tickDelta );
32+ }
2833 }
2934}
0 commit comments