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

package com.hypixel.hytale.builtin.adventure.memories.temple;

import com.hypixel.hytale.codec.KeyedCodec;
import com.hypixel.hytale.codec.Codec;
import com.hypixel.hytale.server.core.asset.type.soundevent.config.SoundEvent;
import com.hypixel.hytale.codec.builder.BuilderCodec;

public class ForgottenTempleConfig
{
    public static final BuilderCodec<ForgottenTempleConfig> CODEC;
    private double minYRespawn;
    private String respawnSound;
    
    public ForgottenTempleConfig() {
        this.minYRespawn = 5.0;
    }
    
    public double getMinYRespawn() {
        return this.minYRespawn;
    }
    
    public String getRespawnSound() {
        return this.respawnSound;
    }
    
    public int getRespawnSoundIndex() {
        if (this.respawnSound == null) {
            return 0;
        }
        return SoundEvent.getAssetMap().getIndex(this.respawnSound);
    }
    
    static {
        CODEC = BuilderCodec.builder(ForgottenTempleConfig.class, ForgottenTempleConfig::new).append(new KeyedCodec<Double>("MinYRespawn", Codec.DOUBLE), (config, o) -> config.minYRespawn = o, config -> config.minYRespawn).documentation("The Y at which players are teleported back to spawn.").add().append(new KeyedCodec("RespawnSound", Codec.STRING), (config, o) -> config.respawnSound = o, config -> config.respawnSound).documentation("The sound ID to play when players respawn in the temple.").add().build();
    }
}
