Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Merge branch 'dev/1.1.0' into dev/3.0.0
# Conflicts: # build.gradle
Dieser Commit ist enthalten in:
Commit
445688b9a1
@ -285,8 +285,7 @@ public class ClientPlaySessionHandler implements MinecraftSessionHandler {
|
||||
|
||||
@Override
|
||||
public boolean handle(ResourcePackResponse packet) {
|
||||
return player.onResourcePackResponse(packet.getStatus(),
|
||||
ByteBufUtil.decodeHexDump(packet.getHash()));
|
||||
return player.onResourcePackResponse(packet.getStatus());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -808,7 +808,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
.compareTo(ProtocolVersion.MINECRAFT_1_17) >= 0) {
|
||||
break;
|
||||
}
|
||||
onResourcePackResponse(PlayerResourcePackStatusEvent.Status.DECLINED, new byte[0]);
|
||||
onResourcePackResponse(PlayerResourcePackStatusEvent.Status.DECLINED);
|
||||
queued = null;
|
||||
}
|
||||
if (queued == null) {
|
||||
@ -844,9 +844,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
/**
|
||||
* Processes a client response to a sent resource-pack.
|
||||
*/
|
||||
public boolean onResourcePackResponse(PlayerResourcePackStatusEvent.Status status,
|
||||
@Nullable byte[] hash) {
|
||||
|
||||
public boolean onResourcePackResponse(PlayerResourcePackStatusEvent.Status status) {
|
||||
final boolean peek = status == PlayerResourcePackStatusEvent.Status.ACCEPTED;
|
||||
final ResourcePackInfo queued = peek
|
||||
? outstandingResourcePacks.peek() : outstandingResourcePacks.poll();
|
||||
@ -863,7 +861,6 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
switch (status) {
|
||||
case ACCEPTED:
|
||||
previousResourceResponse = true;
|
||||
@ -884,9 +881,7 @@ public class ConnectedPlayer implements MinecraftConnectionAssociation, Player {
|
||||
}
|
||||
|
||||
if (!peek) {
|
||||
connection.eventLoop().execute(() -> {
|
||||
tickResourcePackQueue();
|
||||
});
|
||||
connection.eventLoop().execute(this::tickResourcePackQueue);
|
||||
}
|
||||
|
||||
return queued != null && queued.getOrigin() == ResourcePackInfo.Origin.DOWNSTREAM_SERVER;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren