mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Fixes ServerTabCompletePacket
You are not reading transactionId, start and length. See protocol at "Tab-Complete (clientbound)": https://wiki.vg/Protocol#Teleport_Confirm
This commit is contained in:
parent
050ddd3911
commit
9efc4cf2aa
1 changed files with 6 additions and 0 deletions
|
@ -52,6 +52,9 @@ public class ServerTabCompletePacket extends MinecraftPacket {
|
|||
|
||||
@Override
|
||||
public void read(NetInput in) throws IOException {
|
||||
this.transactionId = in.readVarInt();
|
||||
this.start = in.readVarInt();
|
||||
this.length = in.readVarInt();
|
||||
this.matches = new String[in.readVarInt()];
|
||||
this.tooltips = new TextMessage[this.matches.length];
|
||||
for(int index = 0; index < this.matches.length; index++) {
|
||||
|
@ -64,6 +67,9 @@ public class ServerTabCompletePacket extends MinecraftPacket {
|
|||
|
||||
@Override
|
||||
public void write(NetOutput out) throws IOException {
|
||||
out.writeVarInt(this.transactionId);
|
||||
out.writeVarInt(this.start);
|
||||
out.writeVarInt(this.length);
|
||||
out.writeVarInt(this.matches.length);
|
||||
for(int index = 0; index < this.matches.length; index++) {
|
||||
out.writeString(this.matches[index]);
|
||||
|
|
Loading…
Reference in a new issue