From 60bd22b241885db5276ea2e7c874751d24d29285 Mon Sep 17 00:00:00 2001 From: hashalite Date: Sun, 18 Dec 2022 21:36:52 -0500 Subject: [PATCH] Disable on damage now ignores damage received in creative mode --- .../java/net/xolt/freecam/mixins/ClientPlayerEntityMixin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/xolt/freecam/mixins/ClientPlayerEntityMixin.java b/src/main/java/net/xolt/freecam/mixins/ClientPlayerEntityMixin.java index 2f38cb11..debeb6b9 100644 --- a/src/main/java/net/xolt/freecam/mixins/ClientPlayerEntityMixin.java +++ b/src/main/java/net/xolt/freecam/mixins/ClientPlayerEntityMixin.java @@ -24,7 +24,7 @@ private void onIsCamera(CallbackInfoReturnable cir) { // Disables freecam upon receiving damage if disableOnDamage is enabled. @Inject(method = "damage", at = @At("HEAD")) private void onDamage(CallbackInfoReturnable cir) { - if (Freecam.isEnabled() && ModConfig.INSTANCE.disableOnDamage && this.equals(MC.player)) { + if (Freecam.isEnabled() && ModConfig.INSTANCE.disableOnDamage && this.equals(MC.player) && !MC.player.isCreative()) { Freecam.setDisableNextTick(true); } }