From 7c35e1c7d12f4577015e17b2424849f58feb58f4 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Thu, 16 Apr 2020 23:59:00 +0200 Subject: [PATCH] Set `CameraEntity.noClip` depending on spectator state (fixes #136) This field is used to decide whether or not to render the inside-block overlay, as such we want it to be set while we're in spectator mode). This wasn't a problem before 1.15 because we also cancel the renderHand call while we're in spectator mode and the same method which renders your hand also renders the overlay, so we were inadvertently canceling that at the same time. With 1.15, that's still the case except when using OF, which splits the method apart by adding three boolean arguments indicating which part to execute. --- src/main/java/com/replaymod/replay/camera/CameraEntity.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/replaymod/replay/camera/CameraEntity.java b/src/main/java/com/replaymod/replay/camera/CameraEntity.java index 39520c18..5e23366b 100644 --- a/src/main/java/com/replaymod/replay/camera/CameraEntity.java +++ b/src/main/java/com/replaymod/replay/camera/CameraEntity.java @@ -566,6 +566,10 @@ public class CameraEntity if (keyBindings.get("replaymod.input.rollcounterclockwise").isPressed()) { roll -= Utils.isCtrlDown() ? 0.2 : 1; } + + //#if MC>=10800 + this.noClip = this.isSpectator(); + //#endif } private void handleInputEvents() {