Начинающий
- Статус
- Оффлайн
- Регистрация
- 17 Июл 2024
- Сообщения
- 96
- Реакции
- 0
- Выберите загрузчик игры
- Vanilla
- Прочие моды
Для работы надо ровная линия когда включаете то надо чтобы перед вами было минимум 5 блоков (если нет то вас флагнет и назад и я понимаю что оно никому не надо то вдруг кому то пригодиться)
Настройка чтобы работало
Matrix Speed 5
Matrix Ticks 25
(ЛОНГЖАМП ВЗЯЛ У centbrowser)
Пожалуйста, авторизуйтесь для просмотра ссылки.
(ss я обрезал чтобы вы не смотрели как я играл и просирался я не 1.8 игрок)
Код:
package client.main.module.impl.movement;
import com.google.common.eventbus.Subscribe;
import client.events.EventMotion;
import client.events.EventPacket;
import client.events.EventUpdate;
import client.events.MovingEvent;
import client.main.module.api.Category;
import client.main.module.api.Module;
import client.main.module.api.ModuleRegister;
import client.main.module.settings.impl.ModeSetting;
import client.main.module.settings.impl.SliderSetting;
import client.util.math.StopWatch;
import client.util.player.InventoryUtil;
import client.util.player.MouseUtil;
import client.util.player.MoveUtils;
import net.minecraft.block.SlabBlock;
import net.minecraft.block.StairsBlock;
import net.minecraft.entity.Pose;
import net.minecraft.network.play.server.SPlayerPositionLookPacket;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.vector.Vector3d;
@ModuleRegister(name = "LongJump", type = Category.Movement, desc = "LongJump")
public class LongJump extends Module {
private boolean placed;
private int counter;
private boolean canBoost;
private boolean flag;
private boolean sent;
private double x;
private double z;
private double y;
private double firstDir;
private int ticks;
private final StopWatch matrixTimer = new StopWatch();
public ModeSetting mod = new ModeSetting("Мод", "Slap", "Slap", "Matrix");
public SliderSetting matrixSpeed = new SliderSetting("Matrix Speed", 2.0f, 0.1f, 5.0f, 0.1f);
public SliderSetting matrixTicks = new SliderSetting("Matrix Ticks", 20, 1, 100, 1);
public LongJump() {
addSettings(mod, matrixSpeed, matrixTicks);
}
StopWatch stopWatch = new StopWatch();
@Subscribe
public void onUpdate(EventUpdate e) {
switch (mod.get()) {
case "Slap" -> {
if (!mc.player.isInWater()) {
int slot = InventoryUtil.getSlotInInventoryOrHotbar();
if (slot == -1) {
print("У вас нет полублоков в хотбаре!");
toggle();
return;
}
int old = mc.player.inventory.currentItem;
RayTraceResult trace = MouseUtil.rayTraceResult(2, mc.player.rotationYaw, 90, mc.player);
if (trace instanceof BlockRayTraceResult result) {
if (MoveUtils.isMoving()) {
if (mc.player.fallDistance >= 0.8
&& mc.world.getBlockState(mc.player.getPosition()).isAir()
&& !mc.world.getBlockState(result.getPos()).isAir()
&& mc.world.getBlockState(result.getPos()).isSolid()
&& !(mc.world.getBlockState(result.getPos()).getBlock() instanceof SlabBlock)
&& !(mc.world.getBlockState(result.getPos()).getBlock() instanceof StairsBlock)) {
mc.player.inventory.currentItem = slot;
placed = true;
mc.playerController.processRightClickBlock(mc.player, mc.world, Hand.MAIN_HAND, result);
mc.player.inventory.currentItem = old;
mc.player.fallDistance = 0;
}
mc.gameSettings.keyBindJump.pressed = false;
if ((mc.player.isOnGround() && !mc.gameSettings.keyBindJump.pressed)
&& placed
&& mc.world.getBlockState(mc.player.getPosition()).isAir()
&& !mc.world.getBlockState(result.getPos()).isAir()
&& mc.world.getBlockState(result.getPos()).isSolid()
&& !(mc.world.getBlockState(result.getPos()).getBlock() instanceof SlabBlock)
&& stopWatch.isReached(750)) {
mc.player.setPose(Pose.STANDING);
stopWatch.reset();
placed = false;
} else if ((mc.player.isOnGround() && !mc.gameSettings.keyBindJump.pressed)) {
mc.player.jump();
placed = false;
}
}
} else {
if ((mc.player.isOnGround() && !mc.gameSettings.keyBindJump.pressed)) {
mc.player.jump();
placed = false;
}
}
}
}
case "Matrix" -> {
if (!canBoost) {
mc.player.setMotion(0, 0, 0);
}
if (!sent) {
mc.player.setMotion(0, 0, 0);
if (ticks > matrixTicks.get()) {
sent = true;
ticks = 0;
canBoost = true;
mc.timer.timerSpeed = 1.0F;
}
}
if (canBoost) {
MoveUtils.setMotion(matrixSpeed.get());
mc.player.setMotion(mc.player.getMotion().x, 0.42, mc.player.getMotion().z);
if (flag) {
toggle();
}
}
ticks++;
}
}
}
@Subscribe
public void onMoving(MovingEvent e) {
if (mod.is("Matrix")) {
if (!canBoost) {
e.setMotion(new Vector3d(0, e.getMotion().y, 0));
}
}
}
@Subscribe
public void onMotion(EventMotion e) {
if (mod.is("Matrix")) {
e.setOnGround(false);
if (!sent) {
e.setX(x);
e.setY(y);
e.setZ(z);
}
}
}
@Subscribe
public void onMotionPost(EventMotion e) {
if (mod.is("Matrix")) {
if (!sent) {
x += -Math.sin(Math.toRadians(firstDir)) * (0.2496 - (ticks % 3 == 0 ? 0.0806 : 0.0));
z += Math.cos(Math.toRadians(firstDir)) * (0.2496 - (ticks % 3 == 0 ? 0.0806 : 0.0));
}
}
}
@Subscribe
public void onLook(EventMotion e) {
if (mod.is("Matrix")) {
if (!sent) {
e.setYaw((float) firstDir);
e.setPitch(1);
}
}
}
@Subscribe
public void onFlag(EventPacket e) {
if (e.getPacket() instanceof SPlayerPositionLookPacket p) {
switch (mod.get()) {
case "Slap" -> {
placed = false;
counter = 0;
mc.player.setPose(Pose.STANDING);
}
case "Matrix" -> {
flag = true;
}
}
}
}
@Override
public void onEnable() {
super.onEnable();
counter = 0;
placed = false;
if (mod.is("Matrix")) {
canBoost = false;
flag = false;
sent = false;
ticks = 0;
x = mc.player.getPosX();
z = mc.player.getPosZ();
y = mc.player.getPosY();
firstDir = mc.player.rotationYaw;
}
}
@Override
public boolean onDisable() {
super.onDisable();
mc.timer.timerSpeed = 1.0F;
return false;
}
}
Matrix Speed 5
Matrix Ticks 25
(ЛОНГЖАМП ВЗЯЛ У centbrowser)
Последнее редактирование: