From 1bcc0f4e071dffa25732e1ff3e4e785eb86547f3 Mon Sep 17 00:00:00 2001 From: Vadim Totok <112573798+VadimTotok@users.noreply.github.com> Date: Tue, 5 May 2026 19:26:39 +0300 Subject: [PATCH 1/2] disable freecam on dimension change prevents a freeze caused by conflicts between Freecam logic and world reinitialization during teleportation --- .../kotlin/com/lambda/module/modules/render/Freecam.kt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt index 959dd43ce..ea23ddf72 100644 --- a/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt +++ b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt @@ -22,6 +22,7 @@ import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig import com.lambda.config.applyEdits import com.lambda.context.SafeContext import com.lambda.event.events.MovementEvent +import com.lambda.event.events.PacketEvent import com.lambda.event.events.PlayerEvent import com.lambda.event.events.RenderEvent import com.lambda.event.events.TickEvent @@ -55,6 +56,7 @@ import com.lambda.util.world.raycast.RayCastUtils.orMiss import net.minecraft.client.network.ClientPlayerEntity import net.minecraft.client.option.Perspective import net.minecraft.entity.player.PlayerEntity +import net.minecraft.network.packet.s2c.play.PlayerRespawnS2CPacket import net.minecraft.util.hit.BlockHitResult import net.minecraft.util.hit.HitResult import net.minecraft.util.math.BlockPos @@ -228,6 +230,11 @@ object Freecam : Module( mc.crosshairTarget = rotation.rayCast(reach, lerpPos).orMiss // Can't be null (otherwise mc will spam "Null returned as 'hitResult', this shouldn't happen!") mc.crosshairTarget?.let { if (it.type != HitResult.Type.MISS) event.cancel() } } + + listen { event -> + val packet = event.packet + if (packet is PlayerRespawnS2CPacket) toggle() + } } private fun SafeContext.findFollowTarget(): PlayerEntity? { From 4fe162a4746e997ac13e8604faec71d4b659ddb0 Mon Sep 17 00:00:00 2001 From: Vadim Totok <112573798+VadimTotok@users.noreply.github.com> Date: Sun, 5 Jul 2026 18:51:40 +0300 Subject: [PATCH 2/2] Update Freecam.kt --- src/main/kotlin/com/lambda/module/modules/render/Freecam.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt index ea23ddf72..4264a4647 100644 --- a/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt +++ b/src/main/kotlin/com/lambda/module/modules/render/Freecam.kt @@ -233,7 +233,7 @@ object Freecam : Module( listen { event -> val packet = event.packet - if (packet is PlayerRespawnS2CPacket) toggle() + if (packet is PlayerRespawnS2CPacket) disable() } } @@ -255,4 +255,4 @@ object Freecam : Module( Free("Free", "Move the camera freely with keyboard input"), FollowPlayer("Follow Player", "Camera follows a player as if attached by an invisible string"); } -} \ No newline at end of file +}