diff --git a/src/main/kotlin/com/lambda/client/module/modules/player/Freecam.kt b/src/main/kotlin/com/lambda/client/module/modules/player/Freecam.kt index 81145fc6e..6b16ac72f 100644 --- a/src/main/kotlin/com/lambda/client/module/modules/player/Freecam.kt +++ b/src/main/kotlin/com/lambda/client/module/modules/player/Freecam.kt @@ -30,6 +30,7 @@ import net.minecraft.entity.Entity import net.minecraft.entity.MoverType import net.minecraft.entity.player.EntityPlayer import net.minecraft.network.play.client.CPacketUseEntity +import net.minecraft.network.play.server.SPacketEntityHeadLook import net.minecraft.util.MovementInput import net.minecraft.util.MovementInputFromOptions import net.minecraft.util.math.BlockPos @@ -55,6 +56,7 @@ object Freecam : Module( private val horizontalSpeed by setting("Horizontal Speed", 20.0f, 1.0f..50.0f, 1f) private val verticalSpeed by setting("Vertical Speed", 20.0f, 1.0f..50.0f, 1f, { directionMode == FlightMode.CREATIVE }) private val autoRotate by setting("Auto Rotate", true) + private val cheese by setting("Cheese", false, description = "Make group pictures without headache") private val arrowKeyMove by setting("Arrow Key Move", true) private val disableOnDisconnect by setting("Disconnect Disable", true) private val leftClickCome by setting("Left Click Come", false) @@ -158,10 +160,26 @@ object Freecam : Module( if (BaritoneUtils.isActive) return@safeListener - if (autoRotate) updatePlayerRotation() + if (cheese) { + cameraGuy?.let { camGuy -> + world.loadedEntityList.filterIsInstance() + .filter { otherPlayer -> otherPlayer != camGuy } + .forEach { otherPlayer -> + val rotation = getRotationTo(otherPlayer.getPositionEyes(1.0f), camGuy.getPositionEyes(1.0f)) + + otherPlayer.rotationYaw = rotation.x + otherPlayer.rotationYawHead = rotation.x + otherPlayer.rotationPitch = rotation.y + } + } + } else if (autoRotate) updatePlayerRotation() if (arrowKeyMove) updatePlayerMovement() } + safeListener { + if (it.packet is SPacketEntityHeadLook && cheese) it.cancel() + } + listener { if (leftClickCome && Mouse.getEventButton() == 0 && clickTimer.tick(1L)) { val result: BlockPos = mc.objectMouseOver.blockPos ?: return@listener