MouseElytraFix module

MouseElytraFix: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

1 implementationPLAYER

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

MelaHack (ThunderHack fork)PLAYERsrc/main/java/thunder/hack/features/modules/player/MouseElytraFix.javaJava · 39 lines · 1.5 KB

Allows you to avoid problems with elytra on the Matrix AC.

MouseElytraFix.javaJava · Minecraft 26.2 · 39 lines · 1.5 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.player;
2
3
import net.minecraft.world.entity.EquipmentSlot;
4
import net.minecraft.world.inventory.ContainerInput;
5
import net.minecraft.world.item.Items;
6
import thunder.hack.features.modules.Module;
7
import thunder.hack.utility.Timer;
8
9
public class MouseElytraFix extends Module {
10
    public MouseElytraFix() {
11
        super("MouseElytraFix", Category.PLAYER);
12
    }
13
14
    private final Timer delay = new Timer();
15
16
    @Override
17
    public void onUpdate() {
18
        if (mc.player.getEquipmentSlotForItem(mc.player.containerMenu.getCarried()).isArmor() && !ElytraSwap.swapping) {
19
            if (delay.every(300) && mc.player.getEquipmentSlotForItem(mc.player.containerMenu.getCarried()) == EquipmentSlot.CHEST)
20
                if (mc.player.getItemBySlot(EquipmentSlot.CHEST).getItem() == Items.ELYTRA) {
21
                    mc.gameMode.handleContainerInput(0, 6, 1, ContainerInput.PICKUP, mc.player);
22
                    int empty = findEmptySlot();
23
                    boolean needDrop = (empty == 999);
24
                    if (needDrop)
25
                        empty = 9;
26
                    mc.gameMode.handleContainerInput(0, empty, 1, ContainerInput.PICKUP, mc.player);
27
                    if (needDrop)
28
                        mc.gameMode.handleContainerInput(0, -999, 1, ContainerInput.PICKUP, mc.player);
29
                }
30
        }
31
    }
32
33
    public static int findEmptySlot() {
34
        for (int i = 0; i < 36; i++)
35
            if (mc.player.getInventory().getItem(i).isEmpty()) return i < 9 ? i + 36 : i;
36
        return 999;
37
    }
38
}
39