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.
This commit is contained in:
Jonas Herzig
2020-04-16 23:59:00 +02:00
parent 3b72a67d2b
commit 7c35e1c7d1

View File

@@ -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() {