Files
HDSkinSupportGravit/README.md
T

102 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# HDSkinSupportGravit
Client-side Minecraft mod that adds **HD skins** (up to 2048×2048) and, importantly,
**animated GIF cape support** — including HD and transparent GIFs — on top of a UUID-keyed
asset API. Built for GravitLauncher setups but backend-agnostic.
This branch targets **Fabric and Forge 1.20.1** through an Architectury multiloader build. The core
(GIF decoder, cape state, mixins) is shared between loaders.
## Features
- **HD skins**: the legacy-skin conversion is rescaled so 128/256/…/2048-wide skins render correctly.
- **GIF capes**: animated capes decoded from GIF (HD, transparency, per-frame timing). Decoded once,
then played back by copying a pre-composited frame per tick — no per-frame decoding, no AWT, so it
doesn't cost FPS. Playback speed comes from the GIF itself (overridable per player).
- HD PNG capes fall through to the vanilla renderer untouched.
- Per-player control and persistence.
### 3D Skin Layers compatibility (Forge)
3D Skin Layers 1.9.2 is supported as an optional, non-bundled mod. Square HD skins from 128x128
through 2048x2048 retain their original texture resolution while a bounded 64x64 alpha map is used
to build the 3D geometry. Failures are logged with the `[SkinsG/3DSL Compat]` prefix and use safe
fallback geometry; if fallback construction also fails, only the affected 3D layer is disabled.
## Backend integration (easy)
The mod talks to your existing site/launcher backend over plain HTTP — no server-side plugin needed.
Set one value (`baseUrl`) in the config and the mod requests:
```
GET <baseUrl>/api/minecraft/cape/<uuid>?gif
```
If the response is a GIF it is animated; anything else (PNG / 404) keeps the vanilla cape. This maps
cleanly onto most launcher-site engines (DLE-based sites, custom backends, etc.) — you just expose
that one endpoint returning the player's GIF cape by UUID. HD skins use the normal skin URL your
launcher already serves, so they need no extra endpoint.
## Install
Drop the matching `skinsg-fabric-x.y.z.jar` or `skinsg-forge-x.y.z.jar` into your Minecraft 1.20.1
client's `mods/` folder. Client-side only.
## Configuration
On first launch the NightSync build writes `config/skinsg.json` with
`https://nightsync.xyz` as `baseUrl`. Existing empty configs are migrated automatically.
```json
{
"baseUrl": "https://your.host",
"mode": "ALL",
"enabled": [],
"blocked": [],
"globalSpeed": 100,
"speed": {}
}
```
- `baseUrl` — root of your asset API (no hardcoded host in the mod).
- `globalSpeed` — playback speed in percent (`100` = the GIF's own timing).
- The rest is managed by the in-game commands and shouldn't be edited by hand.
Edit `baseUrl`, then restart the client (or rejoin).
## Commands
`/skinsg` (client-side, tab-completes online players and `@a`):
| Command | Effect |
| --- | --- |
| `/skinsg playgif` | Turn animated capes off (frees memory) |
| `/skinsg playgif @a` | Animate everyone |
| `/skinsg playgif <player>` | Animate only listed players |
| `/skinsg stopgif` | Same as `playgif` with no target — off |
| `/skinsg stopgif @a` | Off for everyone |
| `/skinsg stopgif <player>` | Stop a specific player (works even in `@a` mode) |
| `/skinsg self` | Animate only your own cape |
| `/skinsg speed @a <percent>` | Global speed override |
| `/skinsg speed <player> <percent>` | Per-player speed override |
All settings persist in `config/skinsg.json`.
## Building
```
./gradlew build
```
Runtime jars:
- `build/libs/skinsg-fabric-<version>.jar`
- `build/libs/skinsg-forge-<version>.jar`
Requires JDK 17.
## License
Free to use and modify for any purpose. Commercial use must credit the author (Nghtly).
See [LICENSE](LICENSE).