3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Make sure that the backend server knows the pack application was successful

accepted, is just the first expected state, we also need to tell that the pack
was actually applied on the client in order to allow it to progress in the connection
process
Dieser Commit ist enthalten in:
Shane Freeder 2024-03-02 15:05:35 +00:00
Ursprung 82189a6a21
Commit 62c6ec044e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: A3F61EA5A085289C

Datei anzeigen

@ -137,8 +137,13 @@ public class ConfigSessionHandler implements MinecraftSessionHandler {
if (serverConn.getPlayer().resourcePackHandler().hasPackAppliedByHash(toSend.getHash())) {
// Do not apply a resource pack that has already been applied
if (serverConn.getConnection() != null) {
// We can technically skip these first 2 states, however, for conformity to normal state flow expectations...
serverConn.getConnection().write(new ResourcePackResponsePacket(
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.ACCEPTED));
serverConn.getConnection().write(new ResourcePackResponsePacket(
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.DOWNLOADED));
serverConn.getConnection().write(new ResourcePackResponsePacket(
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.SUCCESSFUL));
}
if (modifiedPack) {
logger.warn("A plugin has tried to modify a ResourcePack provided by the backend server "