mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-15 13:40:14 +02:00
Changed method signature
This commit is contained in:
parent
c914a494e8
commit
72cbf97019
@ -41,7 +41,7 @@ public class PacketSnapshot implements PacketOut {
|
|||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
public PacketSnapshot encodePacket() {
|
public void encode() {
|
||||||
Map<Integer, Version> hashes = new HashMap<>();
|
Map<Integer, Version> hashes = new HashMap<>();
|
||||||
|
|
||||||
for (Version version : Version.values()) {
|
for (Version version : Version.values()) {
|
||||||
@ -63,8 +63,6 @@ public class PacketSnapshot implements PacketOut {
|
|||||||
|
|
||||||
encodedMessage.release();
|
encodedMessage.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -84,6 +82,8 @@ public class PacketSnapshot implements PacketOut {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static PacketSnapshot of(PacketOut packet) {
|
public static PacketSnapshot of(PacketOut packet) {
|
||||||
return new PacketSnapshot(packet).encodePacket();
|
PacketSnapshot snapshot = new PacketSnapshot(packet);
|
||||||
|
snapshot.encode();
|
||||||
|
return snapshot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user