Cape module

Cape: Minecraft 26.3 cheat module, full source for every implementation (1 client: KiwiClient).

1 implementationOTHER

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.

KiwiClientOTHERsrc/main/java/com/tangykiwi/kiwiclient/module/other/Cape.javaJava · 47 lines · 1.7 KB

Custom cape

SettingsStyleGlint
Cape.javaJava · Minecraft 26.2 · 47 lines · 1.7 KB · complete file, verbatimOriginal ↗
1
package com.tangykiwi.kiwiclient.module.other;
2
3
import com.tangykiwi.kiwiclient.module.Category;
4
import com.tangykiwi.kiwiclient.module.Module;
5
import com.tangykiwi.kiwiclient.module.setting.ModeSetting;
6
import com.tangykiwi.kiwiclient.module.setting.ToggleSetting;
7
import com.tangykiwi.kiwiclient.util.Textures;
8
9
import net.minecraft.resources.Identifier;
10
11
public class Cape extends Module {
12
    private long lastFrameTime = 0L;
13
    private int lastFrame = 1;
14
    private int capeInterval = 100;
15
16
    public Cape() {
17
        super("Cape", "Custom cape", Category.OTHER,
18
            new ModeSetting("Style", "Cape to display", "Default", "Animated", "Gura", "AhriR34"),
19
            new ToggleSetting("Glint", "Enchanted cape effect", true));
20
    }
21
22
    public Identifier getCape() {
23
        if (getSetting(0).asMode().getValue() == 0) {
24
            return Textures.CAPE;
25
        } else if (getSetting(0).asMode().getValue() == 1) {
26
            return getFrame();
27
        } else if (getSetting(0).asMode().getValue() == 2) {
28
            return Textures.CAPE2;
29
        }
30
        return Textures.CAPE3;
31
    }
32
33
    private Identifier getFrame() {
34
        long time = System.currentTimeMillis();
35
        if (time > this.lastFrameTime + (long)this.capeInterval) {
36
            int currentFrameNo = this.lastFrame + 1 > 32 ? 1 : this.lastFrame + 1;
37
            this.lastFrame = currentFrameNo;
38
            this.lastFrameTime = time;
39
            return Identifier.parse(String.format("kiwiclient:textures/cosmetic/cape/gif/cape%d.png", currentFrameNo));
40
        } else {
41
            return Identifier.parse(String.format("kiwiclient:textures/cosmetic/cape/gif/cape%d.png", this.lastFrame));
42
        }
43
    }
44
45
    // handling done in CapeFeatureRendererMixin
46
}
47