mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-12-04 21:01:02 -05:00
Add ClientEntityNBTRequestPacket
This commit is contained in:
parent
cace45970a
commit
074bd8d84f
2 changed files with 43 additions and 1 deletions
|
@ -34,6 +34,7 @@ import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientEncha
|
|||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientPrepareCraftingGridPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.window.ClientWindowActionPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientBlockNBTRequestPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientEntityNBTRequestPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSpectatePacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSteerBoatPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.client.world.ClientSteerVehiclePacket;
|
||||
|
@ -447,7 +448,7 @@ public class MinecraftProtocol extends PacketProtocol {
|
|||
this.registerOutgoing(0x09, ClientCloseWindowPacket.class);
|
||||
this.registerOutgoing(0x0A, ClientPluginMessagePacket.class);
|
||||
this.registerOutgoing(0x0B, ClientEditBookPacket.class);
|
||||
// FIXME: 0C
|
||||
this.registerOutgoing(0x0C, ClientEntityNBTRequestPacket.class);
|
||||
this.registerOutgoing(0x0D, ClientPlayerInteractEntityPacket.class);
|
||||
this.registerOutgoing(0x0E, ClientKeepAlivePacket.class);
|
||||
this.registerOutgoing(0x0F, ClientPlayerMovementPacket.class);
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.github.steveice10.mc.protocol.packet.ingame.client.world;
|
||||
|
||||
import com.github.steveice10.mc.protocol.packet.MinecraftPacket;
|
||||
import com.github.steveice10.packetlib.io.NetInput;
|
||||
import com.github.steveice10.packetlib.io.NetOutput;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class ClientEntityNBTRequestPacket extends MinecraftPacket {
|
||||
private int transactionId;
|
||||
private int entityId;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private ClientEntityNBTRequestPacket() {
|
||||
}
|
||||
|
||||
public ClientEntityNBTRequestPacket(int transactionId, int entityId) {
|
||||
this.transactionId = transactionId;
|
||||
this.entityId = entityId;
|
||||
}
|
||||
|
||||
public int getTransactionId() {
|
||||
return this.transactionId;
|
||||
}
|
||||
|
||||
public int getEntityId() {
|
||||
return this.entityId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(NetInput in) throws IOException {
|
||||
this.transactionId = in.readVarInt();
|
||||
this.entityId = in.readVarInt();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(NetOutput out) throws IOException {
|
||||
out.writeVarInt(this.transactionId);
|
||||
out.writeVarInt(this.entityId);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue