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

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

import com.hypixel.hytale.builtin.hytalegenerator.newsystem.TerrainDensityProvider;
import com.hypixel.hytale.builtin.hytalegenerator.threadindexer.WorkerIndexer;
import com.hypixel.hytale.math.vector.Vector3i;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;

public abstract class MaterialProvider<V>
{
    @Nullable
    public abstract V getVoxelTypeAt(@Nonnull final Context p0);
    
    @Nonnull
    public static <V> MaterialProvider<V> noMaterialProvider() {
        return new ConstantMaterialProvider<V>(null);
    }
    
    public static class Context
    {
        @Nonnull
        public Vector3i position;
        public double density;
        public int depthIntoFloor;
        public int depthIntoCeiling;
        public int spaceAboveFloor;
        public int spaceBelowCeiling;
        @Nonnull
        public WorkerIndexer.Id workerId;
        @Nullable
        public TerrainDensityProvider terrainDensityProvider;
        public double distanceToBiomeEdge;
        
        public Context(@Nonnull final Vector3i position, final double density, final int depthIntoFloor, final int depthIntoCeiling, final int spaceAboveFloor, final int spaceBelowCeiling, @Nonnull final WorkerIndexer.Id workerId, @Nullable final TerrainDensityProvider terrainDensityProvider, final double distanceToBiomeEdge) {
            this.position = position;
            this.density = density;
            this.depthIntoFloor = depthIntoFloor;
            this.depthIntoCeiling = depthIntoCeiling;
            this.spaceAboveFloor = spaceAboveFloor;
            this.spaceBelowCeiling = spaceBelowCeiling;
            this.workerId = workerId;
            this.terrainDensityProvider = terrainDensityProvider;
            this.distanceToBiomeEdge = distanceToBiomeEdge;
        }
        
        public Context(@Nonnull final Context other) {
            this.position = other.position;
            this.density = other.density;
            this.depthIntoFloor = other.depthIntoFloor;
            this.depthIntoCeiling = other.depthIntoCeiling;
            this.spaceAboveFloor = other.spaceAboveFloor;
            this.spaceBelowCeiling = other.spaceBelowCeiling;
            this.workerId = other.workerId;
            this.terrainDensityProvider = other.terrainDensityProvider;
            this.distanceToBiomeEdge = other.distanceToBiomeEdge;
        }
    }
}
