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

package com.hypixel.hytale.server.worldgen.cave;

import com.hypixel.hytale.server.worldgen.cave.element.CaveNode;

public enum CavePrefabPlacement
{
    CEILING((seed, x, z, caveNode) -> caveNode.getCeilingPosition(seed, x, z)), 
    FLOOR((seed, x, z, caveNode) -> caveNode.getFloorPosition(seed, x, z)), 
    DEFAULT((seed, x, z, caveNode) -> (int)caveNode.getBounds().fractionY(0.5));
    
    public static final int NO_HEIGHT = -1;
    private final PrefabPlacementFunction function;
    
    private CavePrefabPlacement(final PrefabPlacementFunction function) {
        this.function = function;
    }
    
    public PrefabPlacementFunction getFunction() {
        return this.function;
    }
    
    @FunctionalInterface
    public interface PrefabPlacementFunction
    {
        int generate(final int p0, final double p1, final double p2, final CaveNode p3);
    }
}
