Upload via GUI (138 Dateien)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# AeroMC Capes
|
||||
|
||||
Shows the **custom capes (including HD up to 1024×512)** of players who designed their cape in the
|
||||
[AeroMC Launcher](https://aeromc.viper.ipv64.net) – right in the game, even if you use a different
|
||||
launcher yourself.
|
||||
|
||||
## How it works
|
||||
- Drop the mod into your `mods` folder – done. No configuration, no Fabric API required.
|
||||
- Whenever Minecraft loads a player's skin, the mod asks the AeroMC server whether that player has
|
||||
an AeroMC cape and shows it instead of the regular cape.
|
||||
- If a player has no AeroMC cape, nothing changes (official Mojang cape or none).
|
||||
- **Client-side only** – servers don't need anything.
|
||||
|
||||
## Compatibility
|
||||
- **Fabric** and **Quilt**
|
||||
- **One jar for all versions**: Minecraft 1.14 to 26.x
|
||||
- Works with old Fabric Loader versions too (0.10 and newer)
|
||||
- Players using the AeroMC Launcher don't need this mod (the launcher already does this on its
|
||||
own) – but having it installed doesn't hurt either.
|
||||
|
||||
## Privacy
|
||||
The mod only sends the (public) UUIDs of players whose skins are currently being loaded to
|
||||
`viper-network.de` to look up their capes. Results are cached for a few minutes.
|
||||
No account or login data is ever transmitted.
|
||||
|
||||
## Create your own cape
|
||||
In the AeroMC Launcher: click your account name (top right) → **Skin ändern…** (Change skin) →
|
||||
in the **Umhang** (Cape) section click **Gestalten…** (Design). You can paint your cape pixel by
|
||||
pixel or insert any image, in sizes from 64×32 up to HD 1024×512.
|
||||
|
||||
---
|
||||
|
||||
### Hinweise zum Hochladen (nicht Teil der Beschreibung)
|
||||
- Name: AeroMC Capes (URL bleibt `aeromc-umhaenge`)
|
||||
- Kurzbeschreibung: Shows custom capes (HD up to 1024×512) made in the AeroMC Launcher – even if you use another launcher. One jar for 1.14–26.x, client-side.
|
||||
- Datei: `dist/aeromc-umhaenge-fabric-1.0.0.jar`
|
||||
- Loader: Fabric, Quilt · Umgebung: Client · Server: nicht nötig
|
||||
- Spielversionen: alle Releases von 1.14 bis zur aktuellen
|
||||
- Kategorien: Sozial (hervorgehoben), Werkzeug („Cosmetic“ gibt es für Mods nicht)
|
||||
- Abhängigkeiten: keine
|
||||
- Lizenz: aktuell „All Rights Reserved“ (in `fabric.mod.json`) – Modrinth akzeptiert das, eine
|
||||
offene Lizenz (z. B. MIT) wirkt aber vertrauenswürdiger.
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"required": false,
|
||||
"minVersion": "0.8",
|
||||
"package": "de.aeromc.capes.mixin",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"client": ["SessionServiceMixin", "SkinLaderMixin"],
|
||||
"injectors": {
|
||||
"defaultRequire": 0
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "aeromc-capes",
|
||||
"version": "1.0.0",
|
||||
"name": "AeroMC Umhänge",
|
||||
"description": "Zeigt die eigenen Umhänge (auch HD) von AeroMC-Spielern im Spiel – gestaltet im AeroMC Launcher. Nur auf dem Client nötig. Funktioniert mit jeder Minecraft-Version, die Fabric unterstützt.",
|
||||
"authors": ["M_Viper"],
|
||||
"contact": {
|
||||
"homepage": "https://aeromc.viper.ipv64.net"
|
||||
},
|
||||
"license": "LicenseRef-All-Rights-Reserved",
|
||||
"icon": "assets/aeromc-capes/icon.png",
|
||||
"environment": "client",
|
||||
"mixins": ["aeromc-capes.mixins.json"],
|
||||
"depends": {
|
||||
"fabricloader": ">=0.10.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package de.aeromc.capes.mixin;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.properties.Property;
|
||||
import com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService;
|
||||
import de.aeromc.capes.mod.Umhaenge;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
/**
|
||||
* Hängt sich an die Textur-Methoden von authlib (beide Fassungen, siehe
|
||||
* agent/…/Umbau.java). require = 0: Es greift immer nur die Methode, die es in
|
||||
* der jeweiligen authlib-Fassung gibt, die andere wird still übersprungen.
|
||||
* remap = false: authlib ist nicht verschleiert, Namen bleiben wie sie sind.
|
||||
*/
|
||||
@Mixin(value = YggdrasilMinecraftSessionService.class, remap = false)
|
||||
public abstract class SessionServiceMixin {
|
||||
|
||||
// wird in den statischen Initialisierer von authlib übernommen: zeigt im Spielprotokoll, dass der Mod greift
|
||||
static {
|
||||
Umhaenge.authlibGreift = true;
|
||||
Umhaenge.meldeAktiv("authlib");
|
||||
}
|
||||
|
||||
// authlib 5+ (Minecraft 1.20.2 … 26.x)
|
||||
@Inject(method = "unpackTextures", at = @At("RETURN"), cancellable = true, remap = false, require = 0)
|
||||
private void aeromc$neu(Property eigenschaft, CallbackInfoReturnable<Object> cir) {
|
||||
aeromc$ersetze(cir, eigenschaft);
|
||||
}
|
||||
|
||||
// authlib 1–4 (Minecraft 1.14 … 1.20.1)
|
||||
@Inject(method = "getTextures(Lcom/mojang/authlib/GameProfile;Z)Ljava/util/Map;", at = @At("RETURN"), cancellable = true, remap = false, require = 0)
|
||||
private void aeromc$alt(GameProfile profil, boolean sicher, CallbackInfoReturnable<Object> cir) {
|
||||
aeromc$ersetze(cir, profil);
|
||||
}
|
||||
|
||||
private static void aeromc$ersetze(CallbackInfoReturnable<Object> cir, Object argument) {
|
||||
try {
|
||||
Object alt = cir.getReturnValue();
|
||||
Object neu = Umhaenge.mitUmhang(alt, argument);
|
||||
if (neu != alt) cir.setReturnValue(neu);
|
||||
} catch (Throwable ignoriert) {
|
||||
// im Zweifel bleibt alles wie ohne Mod
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package de.aeromc.capes.mixin;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import com.mojang.authlib.minecraft.MinecraftSessionService;
|
||||
import de.aeromc.capes.mod.Umhaenge;
|
||||
import net.minecraft.class_1071;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Zweiter Weg für alte Fabric Loader (vor 0.12): Die lassen Mixins nur in
|
||||
* Minecraft selbst zu, nicht in authlib – SessionServiceMixin greift dort also
|
||||
* nie. Deshalb wird hier der Aufruf von getTextures im Skin-Lader von Minecraft
|
||||
* (PlayerSkinProvider = class_1071, Intermediary-Name, gleich in 1.14 … 1.20.1)
|
||||
* umgeleitet. Bei neuen Loadern erledigt das bereits SessionServiceMixin, dann
|
||||
* reicht diese Umleitung das Ergebnis nur unverändert durch.
|
||||
*/
|
||||
@Mixin(value = class_1071.class, targets = "net.minecraft.class_1071$1", remap = false)
|
||||
public abstract class SkinLaderMixin {
|
||||
|
||||
@Redirect(method = "*", at = @At(value = "INVOKE", remap = false,
|
||||
target = "Lcom/mojang/authlib/minecraft/MinecraftSessionService;getTextures(Lcom/mojang/authlib/GameProfile;Z)Ljava/util/Map;"),
|
||||
remap = false, require = 0)
|
||||
private Map aeromc$texturen(MinecraftSessionService dienst, GameProfile profil, boolean sicher) {
|
||||
Map texturen = dienst.getTextures(profil, sicher);
|
||||
if (Umhaenge.authlibGreift) return texturen;
|
||||
Umhaenge.meldeAktiv("Skin-Lader");
|
||||
try {
|
||||
Object neu = Umhaenge.mitUmhang(texturen, profil);
|
||||
return neu instanceof Map ? (Map) neu : texturen;
|
||||
} catch (Throwable ignoriert) {
|
||||
return texturen;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package de.aeromc.capes.mod;
|
||||
|
||||
import de.aeromc.capes.Nachschlagen;
|
||||
|
||||
/**
|
||||
* AeroMC Umhänge – Fabric/Quilt-Mod für Spieler, die NICHT den AeroMC Launcher
|
||||
* nutzen. Er macht dasselbe wie der Umhang-Agent des Launchers: In Mojangs
|
||||
* authlib wird der AeroMC-Umhang eines Spielers eingesetzt, sobald Minecraft
|
||||
* dessen Skin lädt. Da nur authlib angepasst wird (nicht Minecraft selbst),
|
||||
* passt ein und derselbe Mod zu jeder Minecraft-Version, die Fabric kennt.
|
||||
* Alte Fabric Loader (vor 0.12) erlauben keine Mixins in authlib, dort greift
|
||||
* stattdessen SkinLaderMixin im Skin-Lader von Minecraft.
|
||||
*/
|
||||
public final class Umhaenge {
|
||||
private static final Nachschlagen DIENST = new Nachschlagen(Nachschlagen.STANDARD_BASIS);
|
||||
|
||||
/** true, sobald SessionServiceMixin in authlib eingebaut wurde (dann ist SkinLaderMixin überflüssig). */
|
||||
public static volatile boolean authlibGreift;
|
||||
private static volatile boolean gemeldet;
|
||||
|
||||
private Umhaenge() {}
|
||||
|
||||
/** Schreibt einmalig ins Spielprotokoll, dass (und über welchen Weg) der Mod greift. */
|
||||
public static void meldeAktiv(String weg) {
|
||||
if (gemeldet || agentAktiv()) return;
|
||||
gemeldet = true;
|
||||
System.out.println("[AeroMC] Umhang-Mod aktiv (" + weg + ")");
|
||||
}
|
||||
|
||||
/** Läuft das Spiel über den AeroMC Launcher, setzt schon dessen Agent die Umhänge ein. */
|
||||
public static boolean agentAktiv() {
|
||||
return System.getProperties().containsKey("aeromc.capes.hook");
|
||||
}
|
||||
|
||||
public static Object mitUmhang(Object ergebnis, Object argument) {
|
||||
if (agentAktiv()) return ergebnis;
|
||||
return DIENST.apply(ergebnis, argument);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package net.minecraft;
|
||||
|
||||
/** Nur zum Kompilieren: Platzhalter für Minecrafts PlayerSkinProvider (Intermediary-Name). Kommt nicht ins Mod-Jar. */
|
||||
public class class_1071 {}
|
||||
Reference in New Issue
Block a user