@@ -30,6 +30,7 @@ import net.minecraft.entity.Entity
30
30
import net.minecraft.entity.MoverType
31
31
import net.minecraft.entity.player.EntityPlayer
32
32
import net.minecraft.network.play.client.CPacketUseEntity
33
+ import net.minecraft.network.play.server.SPacketEntityHeadLook
33
34
import net.minecraft.util.MovementInput
34
35
import net.minecraft.util.MovementInputFromOptions
35
36
import net.minecraft.util.math.BlockPos
@@ -55,6 +56,7 @@ object Freecam : Module(
55
56
private val horizontalSpeed by setting(" Horizontal Speed" , 20.0f , 1.0f .. 50.0f , 1f )
56
57
private val verticalSpeed by setting(" Vertical Speed" , 20.0f , 1.0f .. 50.0f , 1f , { directionMode == FlightMode .CREATIVE })
57
58
private val autoRotate by setting(" Auto Rotate" , true )
59
+ private val cheese by setting(" Cheese" , false , description = " Make group pictures without headache" )
58
60
private val arrowKeyMove by setting(" Arrow Key Move" , true )
59
61
private val disableOnDisconnect by setting(" Disconnect Disable" , true )
60
62
private val leftClickCome by setting(" Left Click Come" , false )
@@ -158,10 +160,26 @@ object Freecam : Module(
158
160
159
161
if (BaritoneUtils .isActive) return @safeListener
160
162
161
- if (autoRotate) updatePlayerRotation()
163
+ if (cheese) {
164
+ cameraGuy?.let { camGuy ->
165
+ world.loadedEntityList.filterIsInstance<EntityPlayer >()
166
+ .filter { otherPlayer -> otherPlayer != camGuy }
167
+ .forEach { otherPlayer ->
168
+ val rotation = getRotationTo(otherPlayer.getPositionEyes(1.0f ), camGuy.getPositionEyes(1.0f ))
169
+
170
+ otherPlayer.rotationYaw = rotation.x
171
+ otherPlayer.rotationYawHead = rotation.x
172
+ otherPlayer.rotationPitch = rotation.y
173
+ }
174
+ }
175
+ } else if (autoRotate) updatePlayerRotation()
162
176
if (arrowKeyMove) updatePlayerMovement()
163
177
}
164
178
179
+ safeListener<PacketEvent .Receive > {
180
+ if (it.packet is SPacketEntityHeadLook && cheese) it.cancel()
181
+ }
182
+
165
183
listener<InputEvent .MouseInputEvent > {
166
184
if (leftClickCome && Mouse .getEventButton() == 0 && clickTimer.tick(1L )) {
167
185
val result: BlockPos = mc.objectMouseOver.blockPos ? : return @listener
0 commit comments