mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Rename ServerAdvancementProgressPacket to ServerAdvancementTabPacket
This commit is contained in:
parent
4301d73953
commit
46e3c4e51d
2 changed files with 14 additions and 14 deletions
|
@ -33,7 +33,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSteerV
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientTeleportConfirmPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientUpdateSignPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientVehicleMovePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerAdvancementProgressPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerAdvancementTabPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerAdvancementsPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerBossBarPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.server.ServerChatPacket;
|
||||
|
@ -374,7 +374,7 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
this.registerIncoming(0x33, ServerResourcePackSendPacket.class);
|
||||
this.registerIncoming(0x34, ServerRespawnPacket.class);
|
||||
this.registerIncoming(0x35, ServerEntityHeadLookPacket.class);
|
||||
this.registerIncoming(0x36, ServerAdvancementProgressPacket.class);
|
||||
this.registerIncoming(0x36, ServerAdvancementTabPacket.class);
|
||||
this.registerIncoming(0x37, ServerWorldBorderPacket.class);
|
||||
this.registerIncoming(0x38, ServerSwitchCameraPacket.class);
|
||||
this.registerIncoming(0x39, ServerPlayerChangeHeldItemPacket.class);
|
||||
|
@ -524,7 +524,7 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
this.registerOutgoing(0x33, ServerResourcePackSendPacket.class);
|
||||
this.registerOutgoing(0x34, ServerRespawnPacket.class);
|
||||
this.registerOutgoing(0x35, ServerEntityHeadLookPacket.class);
|
||||
this.registerOutgoing(0x36, ServerAdvancementProgressPacket.class);
|
||||
this.registerOutgoing(0x36, ServerAdvancementTabPacket.class);
|
||||
this.registerOutgoing(0x37, ServerWorldBorderPacket.class);
|
||||
this.registerOutgoing(0x38, ServerSwitchCameraPacket.class);
|
||||
this.registerOutgoing(0x39, ServerPlayerChangeHeldItemPacket.class);
|
||||
|
|
|
@ -7,35 +7,35 @@ import com.github.steveice10.packetlib.packet.Packet;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ServerAdvancementProgressPacket implements Packet {
|
||||
private String id;
|
||||
public class ServerAdvancementTabPacket implements Packet {
|
||||
private String tabId;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private ServerAdvancementProgressPacket() {
|
||||
private ServerAdvancementTabPacket() {
|
||||
}
|
||||
|
||||
public ServerAdvancementProgressPacket(String id) {
|
||||
this.id = id;
|
||||
public ServerAdvancementTabPacket(String tabId) {
|
||||
this.tabId = tabId;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
public String getTabId() {
|
||||
return this.tabId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(NetInput in) throws IOException {
|
||||
if (in.readBoolean()) {
|
||||
this.id = in.readString();
|
||||
this.tabId = in.readString();
|
||||
} else {
|
||||
this.id = null;
|
||||
this.tabId = null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(NetOutput out) throws IOException {
|
||||
if (this.id != null) {
|
||||
if (this.tabId != null) {
|
||||
out.writeBoolean(true);
|
||||
out.writeString(this.id);
|
||||
out.writeString(this.tabId);
|
||||
} else {
|
||||
out.writeBoolean(false);
|
||||
}
|
Loading…
Reference in a new issue