0x48 S48PacketResourcePackSend

Sends a resource pack URL and hash. Client downloads and applies it.

Clientbound (Server → Client) · PLAY · net/minecraft/network/play/server/S48PacketResourcePackSend.java

Published 2026-06-18 · Updated 2026-10-14

resourcepackdownload
Comprehensive 8/8

Fields

FieldTypeDescription
urlStringDownload URL
hashStringSHA-1 hash

Wire Encoding

FieldTypeNotes
URLString
HashStringSHA-1 hash

MCP References

MCPNetHandlerPlayClient.handleResourcePackSend()

Handler Interface

HNDINetHandlerPlayClient

Notes

Client responds with C19PacketResourcePackStatus. Hash is used to verify download integrity.

Vanilla Source

S48PacketResourcePackSend.java63 lines · MCP 1.8.9Original ↗
1
package net.minecraft.network.play.server;
2
3
import java.io.IOException;
4
import net.minecraft.network.Packet;
5
import net.minecraft.network.PacketBuffer;
6
import net.minecraft.network.play.INetHandlerPlayClient;
7
8
public class S48PacketResourcePackSend implements Packet<INetHandlerPlayClient>
9
{
10
    private String url;
11
    private String hash;
12
13
    public S48PacketResourcePackSend()
14
    {
15
    }
16
17
    public S48PacketResourcePackSend(String url, String hash)
18
    {
19
        this.url = url;
20
        this.hash = hash;
21
22
        if (hash.length() > 40)
23
        {
24
            throw new IllegalArgumentException("Hash is too long (max 40, was " + hash.length() + ")");
25
        }
26
    }
27
28
    /**
29
     * Reads the raw packet data from the data stream.
30
     */
31
    public void readPacketData(PacketBuffer buf) throws IOException
32
    {
33
        this.url = buf.readStringFromBuffer(32767);
34
        this.hash = buf.readStringFromBuffer(40);
35
    }
36
37
    /**
38
     * Writes the raw packet data to the data stream.
39
     */
40
    public void writePacketData(PacketBuffer buf) throws IOException
41
    {
42
        buf.writeString(this.url);
43
        buf.writeString(this.hash);
44
    }
45
46
    /**
47
     * Passes this Packet on to the NetHandler for processing.
48
     */
49
    public void processPacket(INetHandlerPlayClient handler)
50
    {
51
        handler.handleResourcePack(this);
52
    }
53
54
    public String getURL()
55
    {
56
        return this.url;
57
    }
58
59
    public String getHash()
60
    {
61
        return this.hash;
62
    }
63
}

Deobfuscated MCP 1.8.9 source of S48PacketResourcePackSend, fetched directly from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/server/S48PacketResourcePackSend.java) at build time and verified present.

Deep Dive

Role in the protocol

The server orders the client to load a resource pack. Two strings travel: the URL and a SHA-1 hash used for integrity. The vanilla flow downloads the pack, applies it and answers with C19PacketResourcePackStatus (ACCEPTED, DECLINED, FAILED_DOWNLOAD, SUCCESSFULLY_LOADED). The level:// scheme is the sharp edge: vanilla maps level://name to a file inside the local saves directory, so the URL doubles as a local file path.

Vanilla handling

handleResourcePack branches on the scheme. level:// URLs resolve against mcDataDir/saves: if the file exists the pack loads and ACCEPTED then SUCCESSFULLY_LOADED are sent; if not, FAILED_DOWNLOAD. HTTP(S) URLs go through the resource pack repository asynchronously, with a GUI prompt unless the server's resource mode is ENABLED or DISABLED.

Why clients touch it

Three defensive implementations in the corpus. Rise 6.1.30 and 6.2.4 run ResourcePackCheck as a SecurityFeature: it validates the scheme, decodes the level:// path, and rejects any URL containing ".." or not ending in /resources.zip, answering with C19 FAILED_DOWNLOAD. Tenacity's AntiExploit module cancels the packet and sends FAILED_DOWNLOAD for the same classes of malicious URLs. LiquidSense Dev injects MixinNetHandlerPlayClient with a HEAD-cancellable @Inject on handleResourcePack that performs the identical scheme and level:// checks, replying C19 FAILED_DOWNLOAD and cancelling the vanilla handler on failure. All three target the level:// traversal that reads arbitrary files from the saves folder.

Exploit surface

A level:// URL with ../ segments walks out of the saves directory into other local files, which the client then loads as a resource pack; vanilla does not verify the hash for level:// packs. Replying FAILED_DOWNLOAD keeps the server's state machine consistent so it stops waiting for a status, which is why both defenses send C19 rather than silently dropping the packet.

Server-Side Handling

Server side, the packet is built by EntityPlayerMP.loadResourcePack or sendResourcePack with an arbitrary URL and hash supplied by plugins or server config. The server waits for a C19 status before re-prompting; a client that never replies eventually stops receiving pack offers. The hash is echoed back verbatim in C19.

Protocol Analysis

Two strings: URL and SHA-1 hash. The level:// scheme is special-cased client-side, and the hash is ignored for level:// packs in vanilla. C19 carries the same hash back, so the status reply identifies which offer it answers. The packet id 0x48 is clientbound-only in PLAY state.

Anti-Cheat Landscape

Not a movement or combat surface: no anti-cheat measures S48 traffic. The defense angle is client security (file disclosure via level://), and both corpus implementations are client-side self-defense rather than anti-cheat bypasses.

implementation Implementation Cases

The resource pack push. Rise 6.x defends it as a SecurityFeature (ResourcePackCheck), Tenacity as an AntiExploit module, and LiquidSense Dev as an @Inject guard on MixinNetHandlerPlayClient; all three reject level:// path traversal URLs and reply C19 FAILED_DOWNLOAD to keep the server's status state machine moving.

ResourcePackCheck (Rise 6.2.4, Rise 6.1.30)

Block malicious resource pack offers, specifically level:// URLs that read local files, before the vanilla download flow runs.

A SecurityFeature (not a toggleable module) whose handle() inspects every packet: for S48 it takes the URL and hash, and only acts on level:// URLs. The URL is parsed as a URI, the scheme must be http, https or level, and a decoded level path containing ".." or not ending in /resources.zip is rejected with C19 FAILED_DOWNLOAD. The attempted path is printed to stdout.

Source: Rise 6.2.4, Client-release2/Client/src/main/java/com/alan/clients/security/impl/ResourcePackCheck.java

Vanilla hook: Security feature packet filter, runs on the receive path before the handler.
Invisible to anti-cheats and servers: the client simply reports a failed download, which is a legitimate outcome a vanilla client produces for a missing or corrupt pack.
Variations: Identical in Rise 6.1.30 and 6.2.4 (same relative path, same logic). Rise also registers S48 in the NetworkAPI script packet list alongside this check.
AntiExploit (Tenacity 6.0)

Cancel malicious resource pack offers inside a general anti-exploit module, replying FAILED_DOWNLOAD so the server does not stall.

PacketReceiveEvent handler: for S48 the URL is parsed as a URI; non-http(s)/level schemes cancel the packet, and level:// URLs containing ".." or not ending in /resources.zip are cancelled with a C19 FAILED_DOWNLOAD reply. URISyntaxException also cancels with FAILED_DOWNLOAD. The same handler guards S43PacketCamera, S2APacketParticles, S27PacketExplosion, S18PacketEntityTeleport and S11PacketSpawnExperienceOrb, plus a 100-packet-per-second counter.

Source: Tenacity 6.0, dev/tenacity/module/impl/misc/AntiExploit.java

Vanilla hook: PacketReceiveEvent.
Cancelling a clientbound packet is invisible to the server; the FAILED_DOWNLOAD reply is the honest part that prevents state desync.
Variations: Tenacity's Enhancements.validateResourcePackUrl (dev/tenacity/util/misc/Enhancements.java) centralizes the same URL check for non-module call sites.
MixinNetHandlerPlayClient (resource pack guard) (LiquidSense Dev)

Block malicious resource pack offers at the vanilla handler, cancelling the download before it starts.

An @Inject(method = "handleResourcePack", at = @At("HEAD"), cancellable = true) mixin on NetHandlerPlayClient. It parses the URL as a URI, requires the scheme to be http, https or level, and rejects level:// URLs containing ".." or not ending in /resources.zip. On any URISyntaxException it logs the failure, sends C19PacketResourcePackStatus FAILED_DOWNLOAD through netManager, and cancels the vanilla handler.

Source: LiquidSense Dev, net/ccbluex/liquidbounce/injection/forge/mixins/network/MixinNetHandlerPlayClient.java

Vanilla hook: @Inject HEAD of NetHandlerPlayClient.handleResourcePack (mixin).
Invisible to anti-cheats and servers: the reply is a legitimate FAILED_DOWNLOAD, identical to what vanilla produces for a bad pack. The mixin runs before any module code, so the guard cannot be toggled off.
Variations: Rise implements the same checks as a SecurityFeature outside the module system; Tenacity inside AntiExploit with a chat notification; LiquidSense at the mixin layer, before the packet reaches any handler logic.
Receive-path filtering: Rise 6.x runs it as a SecurityFeature over the incoming packet stream, Tenacity hooks PacketReceiveEvent, and LiquidSense Dev cancels the vanilla handler from a mixin. All three reply C19PacketResourcePackStatus FAILED_DOWNLOAD instead of dropping silently.
Rise implements it outside the module system (SecurityFeature with a handle() contract); Tenacity as a normal module with a chat notification; LiquidSense Dev at the mixin layer with a logger error. All three reject the same URL classes: non-http(s)/level schemes and level:// paths with .. or a non-/resources.zip suffix.

anticheat Anti-Cheat Checks

Artemis is the only anticheat with logic on the send side of the resource-pack flow. Its PingSpoofProtocol pushes a fake S48 offer whose URL encodes a keepalive id and validates the client's C19 FAILED_DOWNLOAD reply, and ResourcePackTickHandler uses a level:// offer with a numeric hash as a tick-confirmation channel. These are the OUT-side arms of the same two checks documented on the C19PacketResourcePackStatus page. FlopAC's WrappedOutResourcePackSend and the Negativity RESOURCE_PACK_SEND constant are wrappers and registrations only.

PingSpoofProtocol (Artemis) (artemisac-artemis-minecraft-anticheat)

Detect ping spoofing with a resource-pack offer as the probe: the server sends S48 with an id-encoded URL and verifies the client's C19 answer.

On 1.9 and older servers the check builds a GPacketPlayServerResourcePackSend whose URL is a generated numeric id (line 175) and pushes it to the client. It then expects the C19 response: FAILED_DOWNLOAD with a matching numeric URL, followed by the next keepalive echo. Missing, out-of-order or non-numeric responses log violations. On 1.10+ it switches to fake teleports because the packet's hash field was removed there.

Detects: Ping spoofers that suppress or reorder keepalives, and clients that answer resource-pack offers they were never sent.

Source: artemisac-artemis-minecraft-anticheat, ac.artemis.checks.enterprise/src/main/java/ac/artemis/checks/enterprise/spoof/PingSpoofProtocol.java

Variations: ResourcePackTickHandler is the non-flagging sibling that reuses the probe as a tick counter; FlopAC and Negativity only register the packet.
ResourcePackTickHandler (Artemis) (artemisac-artemis-minecraft-anticheat)

Use a level:// resource-pack offer as a tick-confirmation channel on 1.8 servers.

On 1.8.9 and below it sends a GPacketPlayServerResourcePackSend whose hash encodes a numeric tick id (line 57), then accepts only C19 FAILED_DOWNLOAD replies whose URL is numeric and contains the player name. The parsed id is stored as the player's resourcePackTick and feeds the tick-confirmation infrastructure other Artemis checks use to measure connection state.

Detects: Nothing directly. It feeds connection-state measurement rather than flagging a behavior.

Source: artemisac-artemis-minecraft-anticheat, ac.artemis.core/src/main/java/ac/artemis/core/v5/features/tick/impl/ResourcePackTickHandler.java

Variations: PingSpoofProtocol is the flagging version of the same mechanism; FlopAC WrappedOutResourcePackSend is a plain wrapper over the packet fields.

Wiki Cross-Reference

Two strings: resource pack URL (32767 cap) and SHA-1 hash (40-char cap). Client answers with C19 status: accepted, declined, failed download, loaded.

The level:// scheme maps into the local saves folder, so malicious URLs with .. segments can probe local files; hash is ignored for level packs.

MCP 1.8.9 S48PacketResourcePackSend implements Packet dispatching to INetHandlerPlayClient.handleResourcePack; wire serde is readPacketData/writePacketData via readStringFromBuffer.

1.8.9 callers: EntityPlayerMP.loadResourcePack sends new S48PacketResourcePackSend (line 1192): https://github.com/Marcelektro/MavenMCP-1.8.9/blob/master/src/main/java/net/minecraft/entity/player/EntityPlayerMP.java

Cross-checked against minecraft.wiki (CC BY-SA 3.0) for 1.8.9 accuracy.

Vanilla Internals

Full 1.8.9 logic-class sources that send or handle this packet, stored verbatim.

Module Analyses Using S48PacketResourcePackSend

Full source walkthroughs of the modules and anti-cheats that use this packet.