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

package com.hypixel.hytale.procedurallib.property;

import javax.annotation.Nonnull;
import com.hypixel.hytale.procedurallib.random.ICoordinateRandomizer;

public class DistortedNoiseProperty implements NoiseProperty
{
    protected final NoiseProperty noiseProperty;
    protected final ICoordinateRandomizer randomizer;
    
    public DistortedNoiseProperty(final NoiseProperty noiseProperty, final ICoordinateRandomizer randomizer) {
        this.noiseProperty = noiseProperty;
        this.randomizer = randomizer;
    }
    
    public NoiseProperty getNoiseProperty() {
        return this.noiseProperty;
    }
    
    public ICoordinateRandomizer getRandomizer() {
        return this.randomizer;
    }
    
    @Override
    public double get(final int seed, final double x, final double y) {
        return this.noiseProperty.get(seed, this.randomizer.randomDoubleX(seed, x, y), this.randomizer.randomDoubleY(seed, x, y));
    }
    
    @Override
    public double get(final int seed, final double x, final double y, final double z) {
        return this.noiseProperty.get(seed, this.randomizer.randomDoubleX(seed, x, y, z), this.randomizer.randomDoubleY(seed, x, y, z), this.randomizer.randomDoubleZ(seed, x, y, z));
    }
    
    @Nonnull
    @Override
    public String toString() {
        return "DistortedNoiseProperty{noiseProperty=" + String.valueOf(this.noiseProperty) + ", randomizer=" + String.valueOf(this.randomizer);
    }
}
