AirPlace mcp base

  • Автор темы Автор темы rusomode
  • Дата начала Дата начала
Начинающий
Начинающий
Статус
Оффлайн
Регистрация
10 Июл 2024
Сообщения
254
Реакции
0
package you.game;

import you.game.client.event.EventTarget;
import you.game.client.event.events.MotionEvent;
import you.game.client.managers.module.Module;
import net.minecraft.item.BlockItem;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockRayTraceResult;

public class AirPlace extends Module {

private BlockRayTraceResult hit;

public AirPlace() {
super("YouGame", Category.YouGame);
}

@EventTarget
public void onUpdate(MotionEvent e) {
if (mc.player.isHandActive()) return;
if (mc.gameSettings.keyBindUseItem.pressed && mc.player.getHeldItemMainhand().getItem() instanceof BlockItem) {
e.setYaw(mc.player.rotationYaw);
e.setPitch(90);
BlockRayTraceResult hitResult = (BlockRayTraceResult) mc.player.pick(4, mc.timer.renderPartialTicks, true);
if (hitResult instanceof BlockRayTraceResult) hit = hitResult;
else return;
mc.player.setSprinting(false);
if (mc.player.isSprinting()) mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.STOP_SPRINTING));
if (!mc.player.isSneaking()) mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.PRESS_SHIFT_KEY));
mc.player.swingArm(Hand.MAIN_HAND);
mc.playerController.func_217292_a(mc.player, mc.world, Hand.MAIN_HAND, hit);
}
}
}
 
Назад
Сверху Снизу