- Выберите загрузчик игры
- Fabric
не видел что-то подобное в этом форуме так что сливаю "ебейший" MaceKill для ТХ
Пожалуйста, авторизуйтесь для просмотра ссылки.
Java:
package thunder.hack.features.modules.combat;
import io.netty.buffer.Unpooled;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.entity.Entity;
import net.minecraft.entity.decoration.EndCrystalEntity;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.network.packet.c2s.play.*;
import org.jetbrains.annotations.NotNull;
import thunder.hack.events.impl.PacketEvent;
import thunder.hack.injection.accesors.IClientPlayerEntity;
import thunder.hack.features.modules.Module;
import thunder.hack.setting.Setting;
//ЭТО КРИТИКАЛСЯ ДОЛБОЭБ
public final class MaceKill extends Module {
public final Setting<Float> Height = new Setting<>("Height", 1f, 1f, 512.0f);
public static boolean cancelCrit;
public MaceKill() {
super("MaceKill", Category.COMBAT);
}
@EventHandler
public void onPacketSend(PacketEvent.@NotNull Send event) {
if (event.getPacket() instanceof PlayerInteractEntityC2SPacket && getInteractType(event.getPacket()) == InteractType.ATTACK) {
Entity ent = getEntity(event.getPacket());
if (ent == null || ent instanceof EndCrystalEntity || cancelCrit)
return;
doCrit();
}
}
public void doCrit() {
if (isDisabled() || mc.player == null || mc.world == null)
return;
if ((mc.player.isOnGround() || mc.player.getAbilities().flying) && !mc.player.isInLava() && !mc.player.isSubmergedInWater()) {
SimulationFallPacket(Height.getValue(), false);
SimulationFallPacket(0., false);
}
}
private void SimulationFallPacket(double yDelta, boolean full) {
if (!full)
sendPacket(new PlayerMoveC2SPacket.PositionAndOnGround(mc.player.getX(), mc.player.getY() + yDelta, mc.player.getZ(), false));
else
sendPacket(new PlayerMoveC2SPacket.Full(mc.player.getX(), mc.player.getY() + yDelta, mc.player.getZ(), ((IClientPlayerEntity) mc.player).getLastYaw(), ((IClientPlayerEntity) mc.player).getLastPitch(), false));
}
public static Entity getEntity(@NotNull PlayerInteractEntityC2SPacket packet) {
PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
packet.write(packetBuf);
return mc.world.getEntityById(packetBuf.readVarInt());
}
public static InteractType getInteractType(@NotNull PlayerInteractEntityC2SPacket packet) {
PacketByteBuf packetBuf = new PacketByteBuf(Unpooled.buffer());
packet.write(packetBuf);
packetBuf.readVarInt();
return packetBuf.readEnumConstant(InteractType.class);
}
public enum InteractType {
INTERACT, ATTACK, INTERACT_AT
}
}