Skip to content

Commit 139be62

Browse files
committed
fixed loop mixin
1 parent f20e98d commit 139be62

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

src/main/java/com/solegendary/reignofnether/mixin/FrustumMixin.java

+13-14
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,19 @@
2020

2121
@Mixin(Frustum.class)
2222
public class FrustumMixin {
23-
// // I have no idea why this is needed but without it the game freezes and gets stuck inside
24-
// // this function forever a few seconds after activating orthoView
25-
// @Inject(
26-
// method = "cubeInFrustum",
27-
// at = @At("HEAD"),
28-
// cancellable = true
29-
// )
30-
// private void cubeCompletelyInFrustum(
31-
// double pMinX, double pMinY, double pMinZ, double pMaxX, double pMaxY, double pMaxZ, CallbackInfoReturnable<Boolean> cir
32-
// ) {
33-
// if (OrthoviewClientEvents.isEnabled()) {
34-
// cir.setReturnValue(true);
35-
// }
36-
// }
23+
24+
// I have no idea why this is needed but without it the game freezes and gets stuck inside
25+
// this function forever a few seconds after activating orthoView
26+
@Inject(
27+
method = "offsetToFullyIncludeCameraCube",
28+
at = @At("HEAD"),
29+
cancellable = true
30+
)
31+
private void offsetToFullyIncludeCameraCube(int p_194442_, CallbackInfoReturnable<Frustum> cir) {
32+
if (OrthoviewClientEvents.isEnabled()) {
33+
cir.setReturnValue((Frustum) (Object) this);
34+
}
35+
}
3736

3837
// see IForgeBlockEntity.getRenderBoundingBox()
3938
@Inject(

0 commit comments

Comments
 (0)