ElytraReplace module

ElytraReplace: 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/ElytraReplace.javaJava · 46 lines · 1.9 KB

Automatically replaces broken elytras with new ones.

SettingsDurability
ElytraReplace.javaJava · Minecraft 26.2 · 46 lines · 1.9 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.player;
2
3
import thunder.hack.core.Managers;
4
import thunder.hack.features.modules.Module;
5
import thunder.hack.gui.notification.Notification;
6
import thunder.hack.setting.Setting;
7
import thunder.hack.utility.player.InventoryUtility;
8
import thunder.hack.utility.player.SearchInvResult;
9
10
import static thunder.hack.features.modules.client.ClientSettings.isRu;
11
12
import net.minecraft.network.protocol.game.ServerboundContainerClosePacket;
13
import net.minecraft.world.entity.EquipmentSlot;
14
import net.minecraft.world.item.ItemStack;
15
import net.minecraft.world.item.Items;
16
17
public class ElytraReplace extends Module {
18
    public ElytraReplace() {
19
        super("ElytraReplace", Category.PLAYER);
20
    }
21
22
    private final Setting<Integer> durability = new Setting<>("Durability", 5, 0, 100);
23
24
    @Override
25
    public void onUpdate() {
26
        ItemStack is = mc.player.getItemBySlot(EquipmentSlot.CHEST);
27
        if(is.is(Items.ELYTRA) && ((100f - ((float) is.getDamageValue() / (float) is.getMaxDamage()) * 100f) <= durability.getValue())){
28
29
            SearchInvResult result = InventoryUtility.findInInventory(stack -> {
30
                if (stack.is(Items.ELYTRA))
31
                    return (100f - ((float) stack.getDamageValue() / (float) stack.getMaxDamage()) * 100f) > durability.getValue();
32
                return false;
33
            });
34
35
            if (result.found()) {
36
                clickSlot(result.slot());
37
                clickSlot(6);
38
                clickSlot(result.slot());
39
                sendPacket(new ServerboundContainerClosePacket(mc.player.containerMenu.containerId));
40
                Managers.NOTIFICATION.publicity("ElytraReplace", isRu() ? "Меняем элитру на новую!" : "Swapping the old elytra for a new one!",2, Notification.Type.SUCCESS);
41
                sendMessage(isRu() ? "Меняем элитру на новую!" : "Swapping the old elytra for a new one!");
42
            }
43
        }
44
    }
45
}
46