-
Автор темы
- #1
ловите жоский селф код
ElytraFlyingFunTime:
// fabos sigma boy
package yt.leyder.modules.impl.movement;
// leyder dlc
import com.google.common.eventbus.Subscribe;
import net.minecraft.item.Items;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.network.play.client.CEntityActionPacket.Action;
import yt.leyder.events.EventUpdate;
import yt.leyder.modules.api.Category;
import yt.leyder.modules.api.Module;
import yt.leyder.modules.api.ModuleRegister;
import yt.leyder.modules.settings.impl.BindSetting;
import yt.leyder.utils.player.MoveUtility;
@ModuleRegister(name = "poebota52fly", category = Category.Movement)
public class poebota52fly extends Module {
private final BindSetting youtubesladerq = new BindSetting("Кнопка активации", -98);
public poebota52fly() {
addSettings(youtubesladerq);
} // by slader
@Subscribe
public void onUpdate(EventUpdate e) {
if (youtubesladerq.isPressed()) {
activateElytra();
}
if (!mc.player.isElytraFlying() &&
mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == Items.ELYTRA &&
MoveUtility.isMoving()) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, Action.START_FALL_FLYING));
mc.player.startFallFlying();
}
if (mc.player.isOnGround() && mc.player.isElytraFlying()) {
if (mc.gameSettings.keyBindJump.isKeyDown()) {
rotatePitch(-45, 12); // тики , потестите сами
} else {
rotatePitch(90, 2);
mc.player.jump();
mc.player.setMotion(mc.player.getMotion().x, 0.085, mc.player.getMotion().z); // z
}
}
}
private void activateElytra() {
if (!mc.player.isElytraFlying() && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == Items.ELYTRA) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, Action.START_FALL_FLYING));
mc.player.startFallFlying();
}
}
private void rotatePitch(float pitch, int ticks) {
float pitchPerTick = pitch / ticks;
for (int i = 0; i < ticks; i++) {
mc.player.rotationPitch += pitchPerTick;
}
}
}