Fixes for StructureGenerationConfig
Do not reset, again not for the API to enforce
Add presets for "standard", "flat", and "none
public interface StructureGenerationConfig {
+ static StructureGenerationConfig standard() {
+ return Sponge.game().factoryProvider().provide(Factory.class).standard();
+ }
+
+ static StructureGenerationConfig flat() {
+ return Sponge.game().factoryProvider().provide(Factory.class).flat();
+ }
+
+ static StructureGenerationConfig none() {
+ return Sponge.game().factoryProvider().provide(Factory.class).none();
+ }
+
static Builder builder() {
- return Sponge.game().builderProvider().provide(Builder.class).reset();
+ return Sponge.game().builderProvider().provide(Builder.class);
}
Optional<SpacedStructureConfig> stronghold();
@@ -54,4 +66,13 @@ static Builder builder() {
Builder removeStructure(Structure structure);
}
+
+ interface Factory {
+
+ StructureGenerationConfig standard();
+
+ StructureGenerationConfig flat();
+
+ StructureGenerationConfig none();
+ }
}
