package net.minecraft.world.level.storage;

import com.mojang.serialization.Lifecycle;
import net.minecraft.world.level.levelgen.WorldGenSettings;
import net.minecraft.world.level.GameRules;
import net.minecraft.world.Difficulty;
import net.minecraft.world.level.GameType;
import net.minecraft.core.RegistryAccess;
import net.minecraft.world.level.LevelSettings;
import javax.annotation.Nullable;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.CrashReportCategory;
import java.util.Set;
import net.minecraft.world.level.DataPackConfig;

public interface WorldData {
    DataPackConfig getDataPackConfig();
    
    void setDataPackConfig(final DataPackConfig bpn);
    
    boolean wasModded();
    
    Set<String> getKnownServerBrands();
    
    void setModdedInfo(final String string, final boolean boolean2);
    
    default void fillCrashReportCategory(final CrashReportCategory k) {
        k.setDetail("Known server brands", () -> String.join(", ", this.getKnownServerBrands()));
        k.setDetail("Level was modded", () -> Boolean.toString(this.wasModded()));
        final int integer2;
        k.setDetail("Level storage version", () -> {
            integer2 = this.getVersion();
            return String.format("0x%05X - %s", integer2, this.getStorageVersionName(integer2));
        });
    }
    
    default String getStorageVersionName(final int integer) {
        switch (integer) {
            case 19133: {
                return "Anvil";
            }
            case 19132: {
                return "McRegion";
            }
            default: {
                return "Unknown?";
            }
        }
    }
    
    @Nullable
    CompoundTag getCustomBossEvents();
    
    void setCustomBossEvents(@Nullable final CompoundTag le);
    
    ServerLevelData overworldData();
    
    LevelSettings getLevelSettings();
    
    CompoundTag createTag(final RegistryAccess gm, @Nullable final CompoundTag le);
    
    boolean isHardcore();
    
    int getVersion();
    
    String getLevelName();
    
    GameType getGameType();
    
    void setGameType(final GameType bpy);
    
    boolean getAllowCommands();
    
    Difficulty getDifficulty();
    
    void setDifficulty(final Difficulty and);
    
    boolean isDifficultyLocked();
    
    void setDifficultyLocked(final boolean boolean1);
    
    GameRules getGameRules();
    
    CompoundTag getLoadedPlayerTag();
    
    CompoundTag endDragonFightData();
    
    void setEndDragonFightData(final CompoundTag le);
    
    WorldGenSettings worldGenSettings();
    
    Lifecycle worldGenSettingsLifecycle();
}
