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

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

import java.util.Objects;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import com.hypixel.hytale.server.core.universe.world.storage.ChunkStore;
import com.hypixel.hytale.component.Holder;

public class SolidMaterial
{
    private final MaterialCache materialCache;
    public final int blockId;
    public final int support;
    public final int rotation;
    public final int filler;
    @Nullable
    public final Holder<ChunkStore> holder;
    
    SolidMaterial(@Nonnull final MaterialCache materialCache, final int blockId, final int support, final int rotation, final int filler, @Nullable final Holder<ChunkStore> holder) {
        this.materialCache = materialCache;
        this.blockId = blockId;
        this.support = support;
        this.rotation = rotation;
        this.filler = filler;
        this.holder = holder;
    }
    
    @Override
    public boolean equals(final Object o) {
        if (o instanceof final SolidMaterial that) {
            return this.blockId == that.blockId && this.support == that.support && this.rotation == that.rotation && this.filler == that.filler && Objects.equals(this.materialCache, that.materialCache) && Objects.equals(this.holder, that.holder);
        }
        return false;
    }
    
    @Override
    public int hashCode() {
        return contentHash(this.blockId, this.support, this.rotation, this.filler, this.holder);
    }
    
    public static int contentHash(final int blockId, final int support, final int rotation, final int filler, @Nullable final Holder<ChunkStore> holder) {
        return Objects.hash(blockId, support, rotation, filler, holder);
    }
    
    @Override
    public String toString() {
        return "SolidMaterial{materialCache=" + String.valueOf(this.materialCache) + ", blockId=" + this.blockId + ", support=" + this.support + ", rotation=" + this.rotation + ", filler=" + this.filler + ", holder=" + String.valueOf(this.holder);
    }
}
