типы не могут перенести на 2.0
package me.yougame.modules.impl.movement;
import com.google.common.eventbus.Subscribe;
import me.yougame.events.Event;
import me.yougame.events.impl.player.EventUpdate;
import me.yougame.modules.Function;
import me.yougame.modules.FunctionAnnotation;
import me.yougame.modules.Type;
import me.yougame.util.movement.MoveUtil;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.Items;
import net.minecraft.network.play.client.CEntityActionPacket;
@FunctionAnnotation(name = "ElytraRecast", type = Type.Movement)
public class ElytraRecast extends Function {
@override
public void onEvent(Event var1) {
}
@Subscribe
public void onUpdate(EventUpdate e) {
if (!mc.player.isElytraFlying() && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == Items.ELYTRA && MoveUtil.isMoving()) {
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_FALL_FLYING));
mc.player.startFallFlying();
}
if (mc.player.isOnGround() && mc.player.isElytraFlying()) {
if (mc.gameSettings.keyBindJump.isKeyDown()) {
// rotate pitch -45 (12 тиков)
} else {
// rotate pitch 90 (2 тика)
mc.player.jump();
mc.player.motion.y = 0.085;
}
}
}
}