// 
// Decompiled by Procyon v0.6.0
// 

package com.hypixel.hytale.builtin.hytalegenerator.material;

import java.util.Objects;
import javax.annotation.Nonnull;

public class FluidMaterial
{
    private final MaterialCache materialCache;
    public final int fluidId;
    public final byte fluidLevel;
    
    FluidMaterial(@Nonnull final MaterialCache materialCache, final int fluidId, final byte fluidLevel) {
        this.materialCache = materialCache;
        this.fluidId = fluidId;
        this.fluidLevel = fluidLevel;
    }
    
    public MaterialCache getVoxelCache() {
        return this.materialCache;
    }
    
    @Override
    public final boolean equals(final Object o) {
        if (o instanceof final FluidMaterial that) {
            return this.fluidId == that.fluidId && this.fluidLevel == that.fluidLevel && this.materialCache.equals(that.materialCache);
        }
        return false;
    }
    
    @Override
    public int hashCode() {
        return contentHash(this.fluidId, this.fluidLevel);
    }
    
    public static int contentHash(final int blockId, final byte fluidLevel) {
        return Objects.hash(blockId, fluidLevel);
    }
    
    @Override
    public String toString() {
        return "FluidMaterial{materialCache=" + String.valueOf(this.materialCache) + ", fluidId=" + this.fluidId + ", fluidLevel=" + this.fluidLevel;
    }
}
