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

package com.hypixel.hytale.builtin.hytalegenerator.assets.delimiters;

import com.hypixel.hytale.codec.KeyedCodec;
import com.hypixel.hytale.codec.Codec;
import javax.annotation.Nonnull;
import com.hypixel.hytale.builtin.hytalegenerator.delimiters.RangeDouble;
import com.hypixel.hytale.assetstore.AssetExtraInfo;
import com.hypixel.hytale.assetstore.codec.AssetBuilderCodec;
import com.hypixel.hytale.assetstore.map.DefaultAssetMap;
import com.hypixel.hytale.assetstore.map.JsonAssetWithMap;

public class RangeDoubleAsset implements JsonAssetWithMap<String, DefaultAssetMap<String, RangeDoubleAsset>>
{
    public static final AssetBuilderCodec<String, RangeDoubleAsset> CODEC;
    private String id;
    private AssetExtraInfo.Data data;
    private double minInclusive;
    private double maxExclusive;
    
    public RangeDoubleAsset() {
        this.minInclusive = 0.0;
        this.maxExclusive = 0.0;
    }
    
    @Nonnull
    public RangeDouble build() {
        return new RangeDouble(this.minInclusive, this.maxExclusive);
    }
    
    @Nonnull
    @Override
    public String getId() {
        return "";
    }
    
    static {
        CODEC = ((AssetBuilderCodec.Builder)AssetBuilderCodec.builder(RangeDoubleAsset.class, RangeDoubleAsset::new, (Codec<String>)Codec.STRING, (asset, id) -> asset.id = id, config -> config.id, (config, data) -> config.data = data, config -> config.data).append(new KeyedCodec<Double>("MinInclusive", Codec.DOUBLE, true), (t, value) -> t.minInclusive = value, t -> t.minInclusive).add().append(new KeyedCodec("MaxExclusive", Codec.DOUBLE, true), (t, value) -> t.maxExclusive = value, t -> t.maxExclusive).add()).build();
    }
}
