Search in sources :

Example 1 with WorldSettings

use of net.minecraft.world.WorldSettings in project malmo by Microsoft.

the class DefaultWorldGeneratorImplementation method createWorld.

@Override
public boolean createWorld(MissionInit missionInit) {
    long seed = getWorldSeedFromString(this.dwparams.getSeed());
    WorldType.worldTypes[0].onGUICreateWorldPress();
    WorldSettings worldsettings = new WorldSettings(seed, GameType.SURVIVAL, true, false, WorldType.worldTypes[0]);
    worldsettings.setWorldName("");
    worldsettings.enableCommands();
    // will be created, it will simply load the old one.
    return MapFileHelper.createAndLaunchWorld(worldsettings, this.dwparams.isDestroyAfterUse());
}
Also used : WorldSettings(net.minecraft.world.WorldSettings)

Example 2 with WorldSettings

use of net.minecraft.world.WorldSettings in project malmo by Microsoft.

the class FlatWorldGeneratorImplementation method createWorld.

@Override
public boolean createWorld(MissionInit missionInit) {
    long seed = DefaultWorldGeneratorImplementation.getWorldSeedFromString(this.fwparams.getSeed());
    WorldSettings worldsettings = new WorldSettings(seed, GameType.SURVIVAL, false, false, WorldType.FLAT);
    // This call to setWorldName allows us to specify the layers of our world, and also the features that will be created.
    // This website provides a handy way to generate these strings: http://chunkbase.com/apps/superflat-generator
    worldsettings.setWorldName(this.fwparams.getGeneratorString());
    // Enables cheat commands.
    worldsettings.enableCommands();
    // will be created, it will simply load the old one.
    return MapFileHelper.createAndLaunchWorld(worldsettings, this.fwparams.isDestroyAfterUse());
}
Also used : WorldSettings(net.minecraft.world.WorldSettings)

Aggregations

WorldSettings (net.minecraft.world.WorldSettings)2