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 mg) throws IOException {
        this.x = mg.readVarInt();
        this.z = mg.readVarInt();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeVarInt(this.x);
        mg.writeVarInt(this.z);
    }
    
    @Override
    public void handle(final ClientGamePacketListener nl) {
        nl.handleSetChunkCacheCenter(this);
    }
    
    public int getX() {
        return this.x;
    }
    
    public int getZ() {
        return this.z;
    }
}
