37 lines
1.4 KiB
Kotlin
37 lines
1.4 KiB
Kotlin
package com.github.itzilly.sbt.features
|
|
|
|
import net.minecraft.client.Minecraft
|
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
|
|
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent
|
|
|
|
|
|
object FarmHelper {
|
|
|
|
// private val mc: Minecraft = Minecraft.getMinecraft()
|
|
// private var isPressingD = false
|
|
// private var isPressingMouse = false
|
|
// @SubscribeEvent
|
|
// fun onPlayerTick(event: PlayerTickEvent) {
|
|
// if (event.player === mc.thePlayer) {
|
|
// if (isPressingD) {
|
|
// mc.thePlayer.moveStrafing = 1.0f // Simulate holding 'd'
|
|
// }
|
|
// if (isPressingMouse) {
|
|
// mc.gameSettings.keyBindAttack.setPressed(true) // Simulate mouse button down
|
|
// }
|
|
// }
|
|
// }
|
|
//
|
|
// @SubscribeEvent
|
|
// fun onKeyInput(event: KeyInputEvent) {
|
|
// if (mc.currentScreen == null) {
|
|
// if (event.getKey() === GLFW.GLFW_KEY_P && event.getAction() === GLFW.GLFW_PRESS) {
|
|
// isPressingD = !isPressingD // Toggle 'd' key
|
|
// }
|
|
// if (event.getKey() === GLFW.GLFW_KEY_O && event.getAction() === GLFW.GLFW_PRESS) {
|
|
// isPressingMouse = !isPressingMouse // Toggle mouse button
|
|
// mc.gameSettings.keyBindAttack.setPressed(isPressingMouse) // Set initial state
|
|
// }
|
|
// }
|
|
// }
|
|
} |