package net.minecraft.server.level;

import net.minecraft.core.BlockPos;

public class BlockDestructionProgress implements Comparable<BlockDestructionProgress> {
    private final int id;
    private final BlockPos pos;
    private int progress;
    private int updatedRenderTick;
    
    public BlockDestructionProgress(final int integer, final BlockPos fk) {
        this.id = integer;
        this.pos = fk;
    }
    
    public BlockPos getPos() {
        return this.pos;
    }
    
    public void setProgress(int integer) {
        if (integer > 10) {
            integer = 10;
        }
        this.progress = integer;
    }
    
    public int getProgress() {
        return this.progress;
    }
    
    public void updateTick(final int integer) {
        this.updatedRenderTick = integer;
    }
    
    public int getUpdatedRenderTick() {
        return this.updatedRenderTick;
    }
    
    @Override
    public boolean equals(final Object object) {
        if (this == object) {
            return true;
        }
        if (object == null || this.getClass() != object.getClass()) {
            return false;
        }
        final BlockDestructionProgress wn3 = (BlockDestructionProgress)object;
        return this.id == wn3.id;
    }
    
    @Override
    public int hashCode() {
        return Integer.hashCode(this.id);
    }
    
    @Override
    public int compareTo(final BlockDestructionProgress wn) {
        if (this.progress != wn.progress) {
            return Integer.compare(this.progress, wn.progress);
        }
        return Integer.compare(this.id, wn.id);
    }
}
