<commit_before>/*
 * This file is part of Sponge, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered.org <http://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package org.spongepowered.api.world.storage;

import com.flowpowered.math.vector.Vector3i;
import com.google.common.base.Optional;
import org.spongepowered.api.GameRegistry;
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.entity.player.gamemode.GameMode;
import org.spongepowered.api.service.persistence.DataSerializable;
import org.spongepowered.api.service.persistence.data.DataContainer;
import org.spongepowered.api.service.persistence.data.DataQuery;
import org.spongepowered.api.service.persistence.data.DataView;
import org.spongepowered.api.world.DimensionType;
import org.spongepowered.api.world.GeneratorType;
import org.spongepowered.api.world.WorldBorder;
import org.spongepowered.api.world.difficulty.Difficulty;
import org.spongepowered.api.world.gen.WorldGeneratorModifier;

import java.util.Collection;
import java.util.Map;
import java.util.UUID;

/**
 * Represents the WorldProperties which are persisted across runtime instances.
 */
public interface WorldProperties extends DataSerializable {

    /**
     * Gets whether this world is enabled. A world which is enabled but unloaded
     * may be loaded automatically if an attempt is made to transfer an entity
     * to the world using {@link Entity#transferToWorld} .
     * 
     * @return Is enabled
     */
    boolean isEnabled();

    /**
     * Sets this world as enabled. A world which is enabled but unloaded may be
     * loaded automatically if an attempt is made to transfer an entity to the
     * world using {@link Entity#transferToWorld} .
     * 
     * @param state The new state
     */
    void setEnabled(boolean state);

    /**
     * Gets whether this world will load when the server starts up.
     * 
     * @return Loads on startup
     */
    boolean loadOnStartup();

    /**
     * Sets whether this world should load when the server starts up.
     * 
     * @param state Should load on startup
     */
    void setLoadOnStartup(boolean state);

    /**
     * Gets whether spawn chunks of this world remain loaded when no players
     * are present.
     *
     * @return True if spawn chunks of this world remain loaded without players,
     *         false if not
     */
    boolean doesKeepSpawnLoaded();

    /**
     * Sets whether the spawn chunks of the world should remain loaded when no
     * players are present.
     * 
     * @param state Should keep spawn loaded
     */
    void setKeepSpawnLoaded(boolean state);

    /**
     * Gets the name of this world.
     * 
     * @return The name
     */
    String getWorldName();

    /**
     * Gets the {@link UUID} of the world.
     * 
     * @return The unique Id
     */
    UUID getUniqueId();

    /**
     * Gets the default spawn position of this world.
     * 
     * @return The spawn position
     */
    Vector3i getSpawnPosition();

    /**
     * Sets the default spawn position of this world.
     * 
     * @param position The spawn position
     */
    void setSpawnPosition(Vector3i position);

    /**
     * Gets the type of the generator for this world.
     * 
     * @return The type
     */
    GeneratorType getGeneratorType();

    /**
     * Gets the seed of this world.
     * 
     * @return The seed
     */
    long getSeed();

    /**
     * Gets the number of ticks which have occurred since the world was created.
     * 
     * @return The total time in ticks
     */
    long getTotalTime();

    /**
     * Gets the time of day, in ticks. The total number of ticks in a day is
     * 24000, however this value does not reset to zero at the start of each day
     * but rather keeps counting passed 24000.
     * 
     * @return The time of day
     */
    long getWorldTime();
<commit_msg>Allow generator type to be set past creation.<commit_after>/*
 * This file is part of Sponge, licensed under the MIT License (MIT).
 *
 * Copyright (c) SpongePowered.org <http://www.spongepowered.org>
 * Copyright (c) contributors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */

package org.spongepowered.api.world.storage;

import com.flowpowered.math.vector.Vector3i;
import com.google.common.base.Optional;
import org.spongepowered.api.GameRegistry;
import org.spongepowered.api.entity.Entity;
import org.spongepowered.api.entity.player.gamemode.GameMode;
import org.spongepowered.api.service.persistence.DataSerializable;
import org.spongepowered.api.service.persistence.data.DataContainer;
import org.spongepowered.api.service.persistence.data.DataQuery;
import org.spongepowered.api.service.persistence.data.DataView;
import org.spongepowered.api.world.DimensionType;
import org.spongepowered.api.world.GeneratorType;
import org.spongepowered.api.world.WorldBorder;
import org.spongepowered.api.world.difficulty.Difficulty;
import org.spongepowered.api.world.gen.WorldGeneratorModifier;

import java.util.Collection;
import java.util.Map;
import java.util.UUID;

/**
 * Represents the WorldProperties which are persisted across runtime instances.
 */
public interface WorldProperties extends DataSerializable {

    /**
     * Gets whether this world is enabled. A world which is enabled but unloaded
     * may be loaded automatically if an attempt is made to transfer an entity
     * to the world using {@link Entity#transferToWorld} .
     * 
     * @return Is enabled
     */
    boolean isEnabled();

    /**
     * Sets this world as enabled. A world which is enabled but unloaded may be
     * loaded automatically if an attempt is made to transfer an entity to the
     * world using {@link Entity#transferToWorld} .
     * 
     * @param state The new state
     */
    void setEnabled(boolean state);

    /**
     * Gets whether this world will load when the server starts up.
     * 
     * @return Loads on startup
     */
    boolean loadOnStartup();

    /**
     * Sets whether this world should load when the server starts up.
     * 
     * @param state Should load on startup
     */
    void setLoadOnStartup(boolean state);

    /**
     * Gets whether spawn chunks of this world remain loaded when no players
     * are present.
     *
     * @return True if spawn chunks of this world remain loaded without players,
     *         false if not
     */
    boolean doesKeepSpawnLoaded();

    /**
     * Sets whether the spawn chunks of the world should remain loaded when no
     * players are present.
     * 
     * @param state Should keep spawn loaded
     */
    void setKeepSpawnLoaded(boolean state);

    /**
     * Gets the name of this world.
     * 
     * @return The name
     */
    String getWorldName();

    /**
     * Gets the {@link UUID} of the world.
     * 
     * @return The unique Id
     */
    UUID getUniqueId();

    /**
     * Gets the default spawn position of this world.
     * 
     * @return The spawn position
     */
    Vector3i getSpawnPosition();

    /**
     * Sets the default spawn position of this world.
     * 
     * @param position The spawn position
     */
    void setSpawnPosition(Vector3i position);

    /**
     * Gets the {@link GeneratorType} of this world.
     * 
     * @return The type
     */
    GeneratorType getGeneratorType();

    /**
     * Sets the {@link GeneratorType} of this world.
     *
     * @param type The generator type
     */
    void setGeneratorType(GeneratorType type);

    /**
     * Gets the seed of this world.
     * 
     * @return The seed
     */
    long getSeed();

    /**
     * Gets the number of ticks which have occurred since the world was created.
     * 
     * @return The total time in ticks
     */
    long getTotalTime();

    /**
     * Gets the time of day, in ticks. The total number of ticks in a day is
     * 24000, however this value does not reset to zero at the start of each day
     * but rather keeps counting passed 24000.
     * 
     * @return The time of day
     */
    long getWorldTime();

{'fraction_non_alphanumeric': 0.07830791933103788, 'fraction_numerical': 0.002557796360059026, 'mean_word_length': 2.852216748768473, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3404151', 'n_tokens_mistral': 2799, 'n_tokens_neox': 2671, 'n_words': 1110}