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 mg) throws IOException {
        this.transactionId = mg.readVarInt();
        this.entityId = mg.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.transactionId);
        mg.writeVarInt(this.entityId);
    }
    
    @Override
    public void handle(final ServerGamePacketListener qz) {
        qz.handleEntityTagQuery(this);
    }
    
    public int getTransactionId() {
        return this.transactionId;
    }
    
    public int getEntityId() {
        return this.entityId;
    }
}
