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

package com.hypixel.hytale.server.npc.asset.builder;

import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
import it.unimi.dsi.fastutil.ints.IntSet;
import com.hypixel.hytale.server.spawning.ISpawnableWithModel;

public abstract class SpawnableWithModelBuilder<T> extends BuilderBase<T> implements ISpawnableWithModel
{
    private IntSet dynamicDependencies;
    
    @Override
    public boolean hasDynamicDependencies() {
        return this.dynamicDependencies != null;
    }
    
    @Override
    public void addDynamicDependency(final int builderIndex) {
        if (this.dynamicDependencies == null) {
            this.dynamicDependencies = new IntOpenHashSet();
        }
        this.dynamicDependencies.add(builderIndex);
    }
    
    @Override
    public IntSet getDynamicDependencies() {
        return this.dynamicDependencies;
    }
    
    @Override
    public void clearDynamicDependencies() {
        if (this.dynamicDependencies != null) {
            this.dynamicDependencies.clear();
        }
    }
    
    @Override
    public boolean isSpawnable() {
        return true;
    }
}
