Начинающий
- Статус
- Онлайн
- Регистрация
- 5 Июн 2024
- Сообщения
- 220
- Реакции
- 2
- Выберите загрузчик игры
- Vanilla
- Forge
- Fabric
- NeoForge
- OptiFine
- ForgeOptiFine
ElytraTarget:
package by.oblamovvv.client.managers.module.impl.combat;
import by.oblamovvv.client.api.events.orbit.EventHandler;
import by.oblamovvv.client.api.events.orbit.EventPriority;
import by.oblamovvv.client.managers.events.player.ElytraEvent;
import by.oblamovvv.client.managers.events.player.UpdateEvent;
import by.oblamovvv.client.managers.module.Category;
import by.oblamovvv.client.managers.module.Module;
import by.oblamovvv.client.managers.module.ModuleInfo;
import by.oblamovvv.client.managers.module.settings.impl.BooleanSetting;
import by.oblamovvv.client.managers.module.settings.impl.ModeSetting;
import by.oblamovvv.client.managers.module.settings.impl.SliderSetting;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
@Getter
@Accessors(fluent = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@ModuleInfo(name = "ElytraTarget", category = Category.COMBAT)
public class ElytraTarget extends Module {
private final BooleanSetting elytraPredict = new BooleanSetting(this, "Elytra Predict", true);
private final BooleanSetting alwaysHit = new BooleanSetting(this, "Always Hit", true);
private final ModeSetting predictOption = new ModeSetting(this, "Predict Option", "Auto Distance", "Custom Distance")
.setVisible(() -> elytraPredict.getValue());
private final ModeSetting bypass = new ModeSetting(this, "Bypass", "Default", "Snap");
private final SliderSetting predictDistance = new SliderSetting(this, "Predict Distance", 4.7f, 1.0f, 10.0f, 0.1f)
.setVisible(() -> elytraPredict.getValue() && predictOption.is("Custom Distance"));
private final SliderSetting distance = new SliderSetting(this, "Distance", 3.0f, 1.0f, 5.0f, 0.1f);
private final SliderSetting preDistance = new SliderSetting(this, "Pre Distance", 15.0f, 1.0f, 30.0f, 1.0f);
private final SliderSetting delay = new SliderSetting(this, "Delay", 200.0f, 100.0f, 400.0f, 50.0f)
.setVisible(() -> bypass.is("Snap"));
private long lastSnapTime = System.currentTimeMillis();
private long getTimeElapsedSinceSnap() {
return System.currentTimeMillis() - lastSnapTime;
}
private void resetSnapTimer() {
lastSnapTime = System.currentTimeMillis();
}
private double distanceToSqr(Vector3d pos1, Vector3d pos2) {
double dx = pos1.x - pos2.x;
double dy = pos1.y - pos2.y;
double dz = pos1.z - pos2.z;
return dx * dx + dy * dy + dz * dz;
}
private double distanceTo(Vector3d pos1, Vector3d pos2) {
return Math.sqrt(distanceToSqr(pos1, pos2));
}
@EventHandler(priority = EventPriority.HIGH)
public void onElytraEvent(ElytraEvent event) {
if (mc.player == null || !mc.player.isElytraFlying()) {
return;
}
KillAura killAura = KillAura.getInstance();
if (killAura == null) return;
LivingEntity target = killAura.target;
if (target == null) return;
if (elytraPredict.getValue()) {
Vector3d playerPos = mc.player.getEyePosition(mc.getRenderPartialTicks());
Vector3d targetPos = target.getPositionVec().add(0, target.getEyeHeight() / 2.0, 0);
Vector3d targetMotion = target.getMotion();
double predictionDistance;
if (predictOption.is("Auto Distance")) {
double distanceToTarget = distanceTo(playerPos, targetPos);
Vector3d relativeMotion = mc.player.getMotion().subtract(targetMotion);
Vector3d toTargetVec = targetPos.subtract(playerPos).normalize();
double closingSpeed = -relativeMotion.dotProduct(toTargetVec);
predictionDistance = MathHelper.clamp(distanceToTarget * 0.3 - closingSpeed, 1.0, 10.0);
} else {
predictionDistance = predictDistance.getValue();
}
Vector3d predictedPos = targetPos.add(targetMotion.scale(predictionDistance));
Vector3d vecToPredicted = predictedPos.subtract(playerPos).normalize();
float predictedYaw = (float) Math.toDegrees(Math.atan2(-vecToPredicted.x, vecToPredicted.z));
float predictedPitch = (float) MathHelper.clamp(
-Math.toDegrees(Math.atan2(vecToPredicted.y, Math.hypot(vecToPredicted.x, vecToPredicted.z))),
-90F, 90F
);
event.setYaw(predictedYaw);
event.setPitch(predictedPitch);
}
}
@EventHandler
public void onUpdate(UpdateEvent event) {
if (mc.player == null || !mc.player.isElytraFlying()) {
return;
}
KillAura killAura = KillAura.getInstance();
if (killAura == null) return;
LivingEntity target = killAura.target;
if (target == null) return;
if (bypass.is("Snap")) {
if (getTimeElapsedSinceSnap() > delay.getValue()) {
Vector3d playerEyes = mc.player.getEyePosition(mc.getRenderPartialTicks());
Vector3d targetPos = target.getPositionVec().add(0, target.getEyeHeight() / 2.0, 0);
double distanceSq = distanceToSqr(playerEyes, targetPos); // Используем наш аналог
double snapTriggerDistanceSq = distance.getValue() * distance.getValue();
if (distanceSq < snapTriggerDistanceSq) {
resetSnapTimer();
}
}
}
}
}
AntiTarget:
package by.oblamovvv.client.managers.module.impl.movement;
import by.oblamovvv.client.api.events.orbit.EventHandler;
import by.oblamovvv.client.managers.events.player.UpdateEvent;
import by.oblamovvv.client.managers.module.Category;
import by.oblamovvv.client.managers.module.Module;
import by.oblamovvv.client.managers.module.ModuleInfo;
import by.oblamovvv.client.managers.module.impl.combat.KillAura;
import by.oblamovvv.client.managers.module.settings.impl.SliderSetting;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
@Getter
@Accessors(fluent = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@ModuleInfo(name = "ElytraAntiTarget", category = Category.MOVEMENT)
public class ElytraAntiTarget extends Module {
private final SliderSetting antiTargetSpeed = new SliderSetting(this, "Anti Target Speed", 2.5f, 2.0f, 3.0f, 0.01f);
@EventHandler
public void onUpdate(UpdateEvent event) {
if (mc.player == null || mc.world == null || !mc.player.isElytraFlying()) {
return;
}
LivingEntity target = KillAura.getInstance() != null ? KillAura.getInstance().target : null;
Vector3d approachPoint = null;
if (target != null) {
approachPoint = target.getPositionVec().add(target.getMotion().scale(5.0));
}
if (approachPoint != null && mc.player.getDistanceSq(approachPoint.x, approachPoint.y, approachPoint.z) < 3.2) {
return;
}
float boostSpeed = antiTargetSpeed.getValue();
float boostPitch = -45.0f;
float escapeYaw = calculateEscapeYaw(mc.player.rotationYaw);
applyAntiTargetBoost(boostSpeed, 1.6f, escapeYaw, boostPitch);
mc.player.rotationYaw = escapeYaw;
mc.player.rotationPitch = boostPitch;
}
private void applyAntiTargetBoost(float speed, float ySpeed, float yaw, float pitch) {
if (mc.player == null) return;
double yawRad = Math.toRadians(yaw);
double motionX = -Math.sin(yawRad) * speed;
double motionZ = Math.cos(yawRad) * speed;
double motionY = 0.0;
if (pitch < 0) {
motionY = -Math.sin(Math.toRadians(pitch)) * ySpeed;
}
motionY = MathHelper.clamp(motionY, -1.0, 1.0);
}
private float calculateEscapeYaw(float yaw) {
float globalYaw = MathHelper.wrapDegrees(yaw);
if (globalYaw >= 0.0f && globalYaw <= 90.0f) {
return 45.0f;
} else if (globalYaw >= 90.0f && globalYaw <= 180.0f) {
return 135.0f;
} else if (globalYaw >= -180.0f && globalYaw <= -90.0f) {
return -135.0f;
} else if (globalYaw >= -90.0f && globalYaw <= 0.0f) {
return -45.0f;
}
return yaw;
}
}
ElytraBooster(полу-рабочий):
package by.oblamovvv.client.managers.module.impl.movement;
import by.oblamovvv.client.api.events.orbit.EventHandler;
import by.oblamovvv.client.managers.events.player.ElytraEvent;
import by.oblamovvv.client.managers.events.player.UpdateEvent;
import by.oblamovvv.client.managers.module.Category;
import by.oblamovvv.client.managers.module.Module;
import by.oblamovvv.client.managers.module.ModuleInfo;
import by.oblamovvv.client.managers.module.impl.combat.KillAura;
import by.oblamovvv.client.managers.module.settings.impl.ModeSetting;
import by.oblamovvv.client.managers.module.settings.impl.SliderSetting;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.math.MathHelper;
@Getter
@Accessors(fluent = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@ModuleInfo(name = "ElytraBooster", category = Category.MOVEMENT)
public class ElytraBooster extends Module {
private final ModeSetting mode = new ModeSetting(this, "Mode", "Max Speed", "Legit Speed", "Custom");
private final SliderSetting speed = new SliderSetting(this, "Speed", 1.5f, 1.5f, 2.2f, 0.01f)
.setVisible(() -> mode.is("Custom"));
private float lastCalculatedSpeed = 1.61f;
private final float lastCalculatedYSpeed = 1.6f;
private float lastCalculatedYaw = 0.0f;
private float lastCalculatedPitch = 0.0f;
private float lastCalculatedVisualPitch = 0.0f;
@EventHandler
public void onUpdate(UpdateEvent event) {
if (mc.player == null || mc.world == null || !mc.player.isElytraFlying()) {
return;
}
LivingEntity target = KillAura.getInstance() != null ? KillAura.getInstance().target : null;
float yaw, pitch;
if (KillAura.getInstance() != null && KillAura.getInstance().target != null) {
yaw = mc.player.rotationYaw;
pitch = mc.player.rotationPitch;
} else {
yaw = mc.player.rotationYaw;
pitch = mc.player.rotationPitch;
}
lastCalculatedYaw = yaw;
lastCalculatedPitch = pitch;
lastCalculatedVisualPitch = pitch;
if (mode.is("Custom")) {
lastCalculatedSpeed = speed.getValue();
} else if (mode.is("Max Speed")) {
lastCalculatedSpeed = calculateMaxSpeed(yaw, pitch);
} else {
lastCalculatedSpeed = calculateLegitSpeed(yaw, pitch);
}
ElytraEvent elytraEvent = new ElytraEvent(lastCalculatedPitch, lastCalculatedYaw, lastCalculatedSpeed, lastCalculatedYSpeed);
elytraEvent.setVisualPitch(lastCalculatedVisualPitch);
applyBoost(elytraEvent.getSpeed(), elytraEvent.getYSpeed(), elytraEvent.getYaw(), elytraEvent.getPitch());
mc.player.rotationYaw = elytraEvent.getYaw();
mc.player.rotationPitch = elytraEvent.getPitch();
mc.player.rotationPitchHead = elytraEvent.getVisualPitch();
}
private void applyBoost(float speed, float ySpeed, float yaw, float pitch) {
if (mc.player == null) return;
double yawRad = Math.toRadians(yaw);
double motionX = -Math.sin(yawRad) * speed;
double motionZ = Math.cos(yawRad) * speed;
double motionY = 0.0;
if (pitch < 0) {
motionY = -Math.sin(Math.toRadians(pitch)) * ySpeed;
}
motionY = MathHelper.clamp(motionY, -1.0, 1.0);
mc.player.setMotion(motionX, motionY, motionZ); // Это может не работать напрямую
}
private boolean isPitchRange(float pitch, float value, float radius) {
float globalPitch = pitch;
float min = MathHelper.wrapDegrees(value - radius);
float max = MathHelper.wrapDegrees(value + radius);
return globalPitch >= min && globalPitch <= max;
}
private boolean isYawRange(float yaw, float value, float radius) {
float globalYaw = MathHelper.wrapDegrees(yaw);
float min = MathHelper.wrapDegrees(value - radius);
float max = MathHelper.wrapDegrees(value + radius);
if (min <= max) {
return globalYaw >= min && globalYaw <= max;
} else {
return globalYaw >= min || globalYaw <= max;
}
}
private float calculateMaxSpeed(float yaw, float pitch) {
float movement = 0.0f;
float movementY = 0.0f;
if (this.isPitchRange(pitch, 10.0f, 6.0f)) {
movement -= 0.04f;
}
if (this.isPitchRange(pitch, -45.0f, 4.0f)) {
movementY += 0.4f;
} else if (this.isPitchRange(pitch, -45.0f, 6.0f)) {
movementY += 0.3f;
}
if (this.isYawRange(yaw, 45.0f, 4.0f)) {
return 2.26f + movementY + movement;
} else if (this.isYawRange(yaw, 45.0f, 6.0f)) {
return 2.22f + movementY + movement;
} else if (this.isYawRange(yaw, 45.0f, 8.0f)) {
return 2.12f + movementY + movement;
} else if (this.isYawRange(yaw, 45.0f, 10.0f)) {
return 2.06f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 12.0f)) {
return 1.96f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 14.0f)) {
return 1.9f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 16.0f)) {
return 1.86f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 19.0f)) {
return 1.82f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 22.0f)) {
return 1.77f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 24.0f)) {
return 1.74f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 26.0f)) {
return 1.72f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 28.0f)) {
return 1.7f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 30.0f)) {
return 1.66f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 34.0f)) {
return 1.65f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 38.0f)) {
return 1.63f + movementY;
} else if (this.isYawRange(yaw, 45.0f, 45.0f)) {
return 1.61f + movementY;
}
return 1.61f + movementY;
}
private float calculateLegitSpeed(float yaw, float pitch) {
if (this.isYawRange(yaw, 45.0f, 22.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 24.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 26.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 28.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 30.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 34.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 38.0f)) {
return 2.0f;
} else if (this.isYawRange(yaw, 45.0f, 45.0f)) {
return 2.0f;
}
if (this.isPitchRange(pitch, 45.0f, 1.0f)) {
return 2.37f;
} else if (this.isPitchRange(pitch, 45.0f, 5.0f)) {
return 2.37f;
} else if (this.isPitchRange(pitch, 45.0f, 8.0f)) {
return 2.37f;
} else if (this.isPitchRange(pitch, 45.0f, 10.0f)) {
return 2.37f;
} else if (this.isPitchRange(pitch, 45.0f, 12.0f)) {
return 2.36f;
} else if (this.isPitchRange(pitch, 45.0f, 14.0f)) {
return 2.35f;
} else if (this.isPitchRange(pitch, 45.0f, 16.0f)) {
return 2.37f;
} else if (this.isPitchRange(pitch, 45.0f, 19.0f)) {
return 2.36f;
}
return 1.61f;
}
}
ElytraFly:
package by.oblamovvv.client.managers.module.impl.movement;
import by.oblamovvv.client.api.events.orbit.EventHandler;
import by.oblamovvv.client.managers.events.input.KeyboardPressEvent;
import by.oblamovvv.client.managers.events.input.MousePressEvent;
import by.oblamovvv.client.managers.events.player.UpdateEvent;
import by.oblamovvv.client.managers.module.Category;
import by.oblamovvv.client.managers.module.Module;
import by.oblamovvv.client.managers.module.ModuleInfo;
import by.oblamovvv.client.managers.module.settings.impl.BooleanSetting;
import by.oblamovvv.client.managers.module.settings.impl.ModeSetting;
import by.oblamovvv.client.managers.module.settings.impl.SliderSetting;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.Accessors;
import lombok.experimental.FieldDefaults;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.inventory.container.ClickType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.network.play.client.CEntityActionPacket;
import net.minecraft.network.play.client.CHeldItemChangePacket;
import net.minecraft.network.play.client.CPlayerTryUseItemPacket;
import net.minecraft.util.Hand;
@Getter
@Accessors(fluent = true)
@FieldDefaults(level = AccessLevel.PRIVATE)
@ModuleInfo(name = "ElytraFly", category = Category.MOVEMENT)
public class ElytraFly extends Module {
private final SliderSetting timerStartFireWork = new SliderSetting(this, "Задержка фейерверка", 400.0f, 50.0f, 1500.0f, 1.0f);
private final BooleanSetting tpssync = new BooleanSetting(this, "Синхронизация с тпс", false);
private final ModeSetting mode = new ModeSetting(this, "Mode", "Старый", "РилиВорлд");
private long lastSwapTime = System.currentTimeMillis();
private long lastFireworkTime = System.currentTimeMillis();
private long lastEquipTime = System.currentTimeMillis();
private long getTimeElapsedSinceSwap() {
return System.currentTimeMillis() - lastSwapTime;
}
private void resetSwapTimer() {
lastSwapTime = System.currentTimeMillis();
}
private long getTimeElapsedSinceFirework() {
return System.currentTimeMillis() - lastFireworkTime;
}
private void resetFireworkTimer() {
lastFireworkTime = System.currentTimeMillis();
}
private long getTimeElapsedSinceEquip() {
return System.currentTimeMillis() - lastEquipTime;
}
private void resetEquipTimer() {
lastEquipTime = System.currentTimeMillis();
}
private int oldItem = -1;
private final by.oblamovvv.common.impl.taskript.Script script = new by.oblamovvv.common.impl.taskript.Script();
@EventHandler
public void onKeyboardPress(KeyboardPressEvent event) {
}
@EventHandler
public void onMousePress(MousePressEvent event) {
}
@EventHandler
public void onUpdate(UpdateEvent e) {
script.update();
if (mc.player == null || mc.world == null) return;
if (oldItem != -1 && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == Items.ELYTRA) {
ItemStack oldItemStack = mc.player.inventory.getStackInSlot(oldItem);
if (!oldItemStack.isEmpty() && oldItemStack.getItem() instanceof net.minecraft.item.ArmorItem && getTimeElapsedSinceEquip() > 550L) {
mc.playerController.windowClick(mc.player.container.windowId, 6, oldItem, ClickType.SWAP, mc.player);
oldItem = -1;
resetEquipTimer();
toggle();
return;
}
}
if (findItem(Items.FIREWORK_ROCKET) == -1) {
return;
}
int timeSwap = 610;
if (tpssync.getValue()) {
timeSwap = 610;
} else if (mode.is("Старый")) {
timeSwap = 185;
}
boolean isElytraEquipped = mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == Items.ELYTRA;
if (!isElytraEquipped && !mc.player.isOnGround() && !mc.player.isInWater() && !mc.player.isInLava() && !mc.player.isElytraFlying()) {
int elytraSlot = findItem(Items.ELYTRA);
if (elytraSlot != -1 && elytraSlot != 38) {
if (getTimeElapsedSinceSwap() > timeSwap) {
resetEquipTimer();
mc.playerController.windowClick(mc.player.container.windowId, 6, elytraSlot, ClickType.SWAP, mc.player);
mc.player.startFallFlying();
mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_FALL_FLYING));
oldItem = elytraSlot;
resetSwapTimer();
}
}
}
if (mc.player.isElytraFlying()) {
if (getTimeElapsedSinceFirework() > timerStartFireWork.getValue()) {
if (mc.player.isHandActive()) {
int fireworkSlot = findItem(Items.FIREWORK_ROCKET);
if (fireworkSlot != -1 && fireworkSlot != 40) {
mc.playerController.windowClick(mc.player.container.windowId, fireworkSlot, 40, ClickType.SWAP, mc.player);
mc.player.connection.sendPacket(new CPlayerTryUseItemPacket(Hand.OFF_HAND));
mc.playerController.windowClick(mc.player.container.windowId, fireworkSlot, 40, ClickType.SWAP, mc.player);
}
} else {
useFirework();
}
resetFireworkTimer();
}
}
}
@Override
public void onDisable() {
super.onDisable();
if (oldItem != -1) {
if (mc.player != null && mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == Items.ELYTRA) {
ItemStack oldItemStack = mc.player.inventory.getStackInSlot(oldItem);
if (!oldItemStack.isEmpty() && oldItemStack.getItem() instanceof net.minecraft.item.ArmorItem) {
mc.playerController.windowClick(mc.player.container.windowId, 6, oldItem, ClickType.SWAP, mc.player);
}
}
oldItem = -1;
}
}
private void useFirework() {
int fireworkSlot = findItem(Items.FIREWORK_ROCKET);
if (fireworkSlot == -1) return;
int originalSlot = mc.player.inventory.currentItem;
if (fireworkSlot >= 0 && fireworkSlot < 9) {
if (fireworkSlot != originalSlot) {
mc.player.connection.sendPacket(new CHeldItemChangePacket(fireworkSlot));
}
mc.player.connection.sendPacket(new CPlayerTryUseItemPacket(Hand.MAIN_HAND));
if (fireworkSlot != originalSlot) {
mc.player.connection.sendPacket(new CHeldItemChangePacket(originalSlot));
}
}
else if (fireworkSlot >= 9 && fireworkSlot < 36) {
mc.playerController.windowClick(mc.player.container.windowId, fireworkSlot, originalSlot, ClickType.SWAP, mc.player);
mc.player.connection.sendPacket(new CPlayerTryUseItemPacket(Hand.MAIN_HAND));
mc.playerController.windowClick(mc.player.container.windowId, fireworkSlot, originalSlot, ClickType.SWAP, mc.player);
}
else if (fireworkSlot == 40) {
mc.player.connection.sendPacket(new CPlayerTryUseItemPacket(Hand.OFF_HAND));
}
}
private int findItem(Item item) {
if (mc.player == null) return -1;
for (int i = 0; i < 9; i++) {
ItemStack stack = mc.player.inventory.getStackInSlot(i);
if (!stack.isEmpty() && stack.getItem() == item) {
return i;
}
}
for (int i = 9; i < 36; i++) {
ItemStack stack = mc.player.inventory.getStackInSlot(i);
if (!stack.isEmpty() && stack.getItem() == item) {
return i;
}
}
ItemStack chestSlot = mc.player.inventory.getStackInSlot(38);
if (!chestSlot.isEmpty() && chestSlot.getItem() == item) {
return 38;
}
ItemStack offhandSlot = mc.player.inventory.getStackInSlot(40);
if (!offhandSlot.isEmpty() && offhandSlot.getItem() == item) {
return 40;
}
return -1;
}
}
ElytraTarget полу рабочий,кому надо тот сможет исправить остальной функционал вроде рабочий.