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 ClientboundSetChunkCacheCenterPacket implements Packet<ClientGamePacketListener> {
    private int x;
    private int z;
    
    public ClientboundSetChunkCacheCenterPacket() {
    }
    
    public ClientboundSetChunkCacheCenterPacket(final int integer1, final int integer2) {
        this.x = integer1;
        this.z = integer2;
    }
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.x = kv.readVarInt();
        this.z = kv.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeVarInt(this.x);
        kv.writeVarInt(this.z);
    }
    
    @Override
    public void handle(final ClientGamePacketListener lw) {
        lw.handleSetChunkCacheCenter(this);
    }
    
    public int getX() {
        return this.x;
    }
    
    public int getZ() {
        return this.z;
    }
}
