mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 12:35:15 +01:00
Fix Sponge generation casting
This commit is contained in:
parent
48064da1ee
commit
33ec80c2cb
@ -26,7 +26,7 @@ import java.util.Objects;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
public class SpongeSetupUtils extends SetupUtils {
|
public class SpongeSetupUtils extends SetupUtils {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateGenerators() {
|
public void updateGenerators() {
|
||||||
if (!SetupUtils.generators.isEmpty()) {
|
if (!SetupUtils.generators.isEmpty()) {
|
||||||
@ -48,7 +48,7 @@ public class SpongeSetupUtils extends SetupUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGenerator(PlotArea plotArea) {
|
public String getGenerator(PlotArea plotArea) {
|
||||||
if (SetupUtils.generators.isEmpty()) {
|
if (SetupUtils.generators.isEmpty()) {
|
||||||
@ -61,7 +61,7 @@ public class SpongeSetupUtils extends SetupUtils {
|
|||||||
WorldGenerator generator = world.getWorldGenerator();
|
WorldGenerator generator = world.getWorldGenerator();
|
||||||
throw new UnsupportedOperationException("NOT IMPLEMENTED YET");
|
throw new UnsupportedOperationException("NOT IMPLEMENTED YET");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String setupWorld(SetupObject object) {
|
public String setupWorld(SetupObject object) {
|
||||||
SetupUtils.manager.updateGenerators();
|
SetupUtils.manager.updateGenerators();
|
||||||
@ -140,16 +140,16 @@ public class SpongeSetupUtils extends SetupUtils {
|
|||||||
if (object.setupGenerator != null) {
|
if (object.setupGenerator != null) {
|
||||||
// create world with generator
|
// create world with generator
|
||||||
GeneratorWrapper<?> gw = SetupUtils.generators.get(object.setupGenerator);
|
GeneratorWrapper<?> gw = SetupUtils.generators.get(object.setupGenerator);
|
||||||
WorldArchetype wgm = (WorldArchetype) gw.getPlatformGenerator();
|
WorldGeneratorModifier wgm = (WorldGeneratorModifier) gw.getPlatformGenerator();
|
||||||
|
|
||||||
WorldArchetype settings = WorldArchetype.builder()
|
WorldArchetype settings = WorldArchetype.builder()
|
||||||
.loadsOnStartup(true)
|
.loadsOnStartup(true)
|
||||||
.keepsSpawnLoaded(true)
|
.keepsSpawnLoaded(true)
|
||||||
.dimension(DimensionTypes.OVERWORLD)
|
.dimension(DimensionTypes.OVERWORLD)
|
||||||
.generator(GeneratorTypes.OVERWORLD)
|
.generator(GeneratorTypes.FLAT)
|
||||||
.usesMapFeatures(false)
|
.usesMapFeatures(false)
|
||||||
.enabled(true)
|
.enabled(true)
|
||||||
//.generatorModifiers(wgm)
|
.generatorModifiers(wgm)
|
||||||
.build("PS",object.world);
|
.build("PS",object.world);
|
||||||
WorldProperties properties = null;
|
WorldProperties properties = null;
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user