// Path: src/main/java/CustomOreGen/Server/DistributionSettingMap.java
// public interface Copyable<T>
// {
//     void copyFrom(T var1);
// }


import java.util.Random;
import CustomOreGen.Server.DistributionSettingMap.Copyable;
import CustomOreGen.Util.PDist.Type;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
package CustomOreGen.Util;



/* Conceptually, HeightScaledPDist could be an extension of PDist, or a decorator. 
 * It requires the world location to calculate some version of the height, or
 * at the very least it needs the height. This means that either 
 * (a) PDist.getValue needs to gain arguments
 * (b) HeightScaledPDist adds an overload or a new method getScaledValue and we expect it to be called instead
 * (c) HeightScaledPDist does NOT extend PDist but provides a similar API
 * 
 * (a) would add complexity but would not clarify what actually depends on height
 * (b) might make too easy to get unscaled values unintentionally
 * (c) not too bad delegating to field instead of super but loss of polymorphism is a tiny pain in parsing
 * 
 * For now, we have gone with (c), the decorator approach. No unifying interface, yet.
 */
public class HeightScaledPDist implements Copyable<HeightScaledPDist> {

	public PDist pdist;
	public HeightScale scaleFrom = new BaseHeightScale();
	public HeightScale scaleTo = new BaseHeightScale();

	public HeightScaledPDist(float mean, float range, Type type)
    {
        this.pdist = new PDist(mean, range, type);
    }

    public HeightScaledPDist(float mean, float range)
    {
        this(mean, range, Type.uniform);
    }

    public HeightScaledPDist()
    {
// Path: src/main/java/CustomOreGen/Server/DistributionSettingMap.java
// public interface Copyable<T>
// {
//     void copyFrom(T var1);
// }


// Path: src/main/java/CustomOreGen/Util/HeightScaledPDist.java
import java.util.Random;
import CustomOreGen.Server.DistributionSettingMap.Copyable;
import CustomOreGen.Util.PDist.Type;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;

package CustomOreGen.Util;



/* Conceptually, HeightScaledPDist could be an extension of PDist, or a decorator. 
 * It requires the world location to calculate some version of the height, or
 * at the very least it needs the height. This means that either 
 * (a) PDist.getValue needs to gain arguments
 * (b) HeightScaledPDist adds an overload or a new method getScaledValue and we expect it to be called instead
 * (c) HeightScaledPDist does NOT extend PDist but provides a similar API
 * 
 * (a) would add complexity but would not clarify what actually depends on height
 * (b) might make too easy to get unscaled values unintentionally
 * (c) not too bad delegating to field instead of super but loss of polymorphism is a tiny pain in parsing
 * 
 * For now, we have gone with (c), the decorator approach. No unifying interface, yet.
 */
public class HeightScaledPDist implements Copyable<HeightScaledPDist> {

	public PDist pdist;
	public HeightScale scaleFrom = new BaseHeightScale();
	public HeightScale scaleTo = new BaseHeightScale();

	public HeightScaledPDist(float mean, float range, Type type)
    {
        this.pdist = new PDist(mean, range, type);
    }

    public HeightScaledPDist(float mean, float range)
    {
        this(mean, range, Type.uniform);
    }

    public HeightScaledPDist()
    {
        this(0.0F, 0.0F, Type.uniform);