package net.minecraft.network.protocol.game;

import net.minecraft.network.PacketListener;
import java.io.IOException;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.protocol.Packet;

public class ServerboundEntityTagQuery implements Packet<ServerGamePacketListener> {
    private int transactionId;
    private int entityId;
    
    public ServerboundEntityTagQuery() {
    }
    
    public ServerboundEntityTagQuery(final int integer1, final int integer2) {
        this.transactionId = integer1;
        this.entityId = integer2;
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.transactionId = kv.readVarInt();
        this.entityId = kv.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeVarInt(this.transactionId);
        kv.writeVarInt(this.entityId);
    }
    
    @Override
    public void handle(final ServerGamePacketListener pl) {
        pl.handleEntityTagQuery(this);
    }
    
    public int getTransactionId() {
        return this.transactionId;
    }
    
    public int getEntityId() {
        return this.entityId;
    }
}
