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

package com.hypixel.hytale.procedurallib.json;

import com.google.gson.JsonElement;
import java.nio.file.Path;
import javax.annotation.Nonnull;
import com.hypixel.hytale.procedurallib.condition.IHeightThresholdInterpreter;

public class HeightThresholdInterpreterJsonLoader<K extends SeedResource> extends JsonLoader<K, IHeightThresholdInterpreter>
{
    protected final int length;
    
    public HeightThresholdInterpreterJsonLoader(@Nonnull final SeedString<K> seed, final Path dataFolder, final JsonElement json, final int length) {
        super(seed.append(".HeightThresholdInterpreter"), dataFolder, json);
        this.length = length;
    }
    
    @Nonnull
    @Override
    public IHeightThresholdInterpreter load() {
        if (NoiseHeightThresholdInterpreterJsonLoader.shouldHandle(this.json.getAsJsonObject())) {
            return new NoiseHeightThresholdInterpreterJsonLoader(this.seed, this.dataFolder, this.json, this.length).load();
        }
        return new BasicHeightThresholdInterpreterJsonLoader(this.seed, this.dataFolder, this.json, this.length).load();
    }
}
