From 33ec80c2cbf85a95a50d78667556abf240919396 Mon Sep 17 00:00:00 2001 From: MattBDev Date: Mon, 25 Jul 2016 18:42:31 -0400 Subject: [PATCH] Fix Sponge generation casting --- .../plotsquared/sponge/util/SpongeSetupUtils.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeSetupUtils.java b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeSetupUtils.java index a72b6574e..e814beaf5 100644 --- a/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeSetupUtils.java +++ b/Sponge/src/main/java/com/plotsquared/sponge/util/SpongeSetupUtils.java @@ -26,7 +26,7 @@ import java.util.Objects; import java.util.Optional; public class SpongeSetupUtils extends SetupUtils { - + @Override public void updateGenerators() { if (!SetupUtils.generators.isEmpty()) { @@ -48,7 +48,7 @@ public class SpongeSetupUtils extends SetupUtils { } } } - + @Override public String getGenerator(PlotArea plotArea) { if (SetupUtils.generators.isEmpty()) { @@ -61,7 +61,7 @@ public class SpongeSetupUtils extends SetupUtils { WorldGenerator generator = world.getWorldGenerator(); throw new UnsupportedOperationException("NOT IMPLEMENTED YET"); } - + @Override public String setupWorld(SetupObject object) { SetupUtils.manager.updateGenerators(); @@ -140,16 +140,16 @@ public class SpongeSetupUtils extends SetupUtils { if (object.setupGenerator != null) { // create world with generator GeneratorWrapper gw = SetupUtils.generators.get(object.setupGenerator); - WorldArchetype wgm = (WorldArchetype) gw.getPlatformGenerator(); - + WorldGeneratorModifier wgm = (WorldGeneratorModifier) gw.getPlatformGenerator(); + WorldArchetype settings = WorldArchetype.builder() .loadsOnStartup(true) .keepsSpawnLoaded(true) .dimension(DimensionTypes.OVERWORLD) - .generator(GeneratorTypes.OVERWORLD) + .generator(GeneratorTypes.FLAT) .usesMapFeatures(false) .enabled(true) - //.generatorModifiers(wgm) + .generatorModifiers(wgm) .build("PS",object.world); WorldProperties properties = null; try {