Skip to content

Commit

Permalink
Send no known packs
Browse files Browse the repository at this point in the history
  • Loading branch information
valaphee committed Dec 30, 2024
1 parent b738682 commit 3801214
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ public boolean handle(TransferPacket packet) {
public boolean handle(KnownPacksPacket packet) {
// Server expects us to reply to this packet
if (serverConn.getPlayer().getConnection().getState() != StateRegistry.CONFIG) {
// TODO: just replay the first packet the user sent
serverConn.ensureConnected().write(packet);
serverConn.ensureConnected().write(new KnownPacksPacket());
return true;
}
return false; // forward
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public class KnownPacksPacket implements MinecraftPacket {

private KnownPack[] packs;

public KnownPacksPacket() {
packs = new KnownPack[0];
}

@Override
public void decode(ByteBuf buf, ProtocolUtils.Direction direction,
ProtocolVersion protocolVersion) {
Expand Down

0 comments on commit 3801214

Please sign in to comment.