Skip to content

Commit

Permalink
Changed default world generator to void
Browse files Browse the repository at this point in the history
  • Loading branch information
roseckyj committed Apr 8, 2024
1 parent c131932 commit 435e32c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import cz.xrosecky.terratinker.Evaluator;
import cz.xrosecky.terratinker.TerraTinker;
import org.bukkit.Difficulty;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.WorldType;
Expand All @@ -28,9 +29,16 @@ public void run() {
plugin.getServer().getScheduler().runTask(plugin, () -> {
// Create a new world
WorldCreator creator = new WorldCreator(id);
creator.type(WorldType.FLAT);
creator.generatorSettings("{\"layers\": [{\"block\": \"air\", \"height\": 1}], \"biome\":\"plains\"}");
creator.environment(World.Environment.NORMAL);
creator.generateStructures(false);
creator.generator(new VoidGen());
world = plugin.getServer().createWorld(creator);
if (world == null) {
throw new RuntimeException("Could not create world");
}
world.setDifficulty(Difficulty.PEACEFUL);
evaluator.evaluate(input, world);
});
}
Expand Down

0 comments on commit 435e32c

Please sign in to comment.