ss (ncp disabler) ss (matrix disabler) package eva.ware.modules.impl.misc; import eva.ware.Evaware; import eva.ware.ui.notify.impl.WarningNotify; import eva.ware.utils.player.MoveUtils; import lombok.Setter; import net.minecraft.inventory.EquipmentSlotType; import net.minecraft.item.ElytraItem; import net.minecraft.item.ItemStack; import net.minecraft.network.play.client.CEntityActionPacket; import net.minecraft.network.play.client.CEntityActionPacket.Action; import com.google.common.eventbus.Subscribe; import eva.ware.events.*; import eva.ware.modules.api.Category; import eva.ware.modules.api.Module; import eva.ware.modules.api.ModuleRegister; import eva.ware.modules.settings.impl.BooleanSetting; import eva.ware.utils.player.InventoryUtil; import net.minecraft.inventory.container.ClickType; import net.minecraft.item.Items; import net.minecraft.network.play.client.CPlayerDiggingPacket; import net.minecraft.util.math.BlockPos; @ModuleRegister(name = "Disabler", category = Category.Misc) public class Disabler extends Module { public static long lastStartFalling; public static BooleanSetting matrixElytraSpoof = new BooleanSetting("MatrixElytraSpoofs", false); public static BooleanSetting ncpmove = new BooleanSetting("NCPMovement", false); public static BooleanSetting vulcanstrafe = new BooleanSetting("VulcanStrafe", false); @setter boolean strafeHacked; public Disabler() { addSettings(matrixElytraSpoof, ncpmove, vulcanstrafe); } @Subscribe public void onUpdate(MovingEvent e) { if ((!matrixElytraSpoof.get() && !ncpmove.get() && !vulcanstrafe.get() )) { toggle(); Evaware.getInstance().getNotifyManager().add(0, new WarningNotify("Включите что-нибудь!", 3000)); } if (vulcanstrafe.get()) { if (mc.player.ticksExisted % 11 == 7) { mc.player.connection.sendPacket(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, BlockPos.ZERO.down(61), mc.player.getHorizontalFacing().getOpposite())); } setStrafeHacked(mc.player.ticksExisted > 8 && (!mc.playerController.getIsHittingBlock() || !(mc.playerController.curBlockDamageMP > 0.0F))); // TODO: make the vulcan jesus disabler } if (matrixElytraSpoof.get()) { int elytra = InventoryUtil.getSlotIDFromItem(Items.ELYTRA); if (elytra == -1) { return; } if ((System.currentTimeMillis() - lastStartFalling) > 150) { disabler(elytra); } } } @Subscribe public void onMotion(EventMotion e) { ItemStack chestStack = mc.player.getItemStackFromSlot(EquipmentSlotType.CHEST); if (ncpmove.get()) { if (!(chestStack.getItem() == Items.ELYTRA)) return; if (mc.player.isOnGround() && !mc.player.isElytraFlying()) mc.player.jump(); if (!MoveUtils.isMoving()) mc.player.motion.x = mc.player.motion.z = 0; if ((!MoveUtils.isBlockUnder(1.5f) || mc.player.collidedVertically) && mc.player.isElytraFlying()) { mc.player.motion.y = mc.player.collidedVertically ? 1 : 0.5; } else if (mc.player.isElytraFlying()) { mc.player.motion.y = mc.player.ticksExisted % 14 == 0 ? -0.25 : -0.05; } if (ElytraItem.isUsable(chestStack) && !mc.player.isElytraFlying() && !mc.player.abilities.isFlying && mc.player.fallDistance >= 0.2f) { mc.player.startFallFlying(); mc.player.connection.sendPacket(new CEntityActionPacket(mc.player, CEntityActionPacket.Action.START_FALL_FLYING)); } } } public static void disabler(int elytra) { if (elytra != -2) { mc.playerController.windowClick(0, elytra, 1, ClickType.PICKUP, mc.player); mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, mc.player); } mc.getConnection().sendPacket(new CEntityActionPacket(mc.player, Action.START_FALL_FLYING)); mc.getConnection().sendPacket(new CEntityActionPacket(mc.player, Action.START_FALL_FLYING)); if (elytra != -2) { mc.playerController.windowClick(0, 6, 1, ClickType.PICKUP, mc.player); mc.playerController.windowClick(0, elytra, 1, ClickType.PICKUP, mc.player); } lastStartFalling = System.currentTimeMillis(); } }