Skip to content

Commit 886e99c

Browse files
committed
Fixes for StructureGenerationConfig
- Do not reset, again not for the API to enforce - Add presets for "standard", "flat", and "none Signed-off-by: Chris Sanders <[email protected]>
1 parent c1b51bb commit 886e99c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

src/main/java/org/spongepowered/api/world/generation/config/structure/StructureGenerationConfig.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,20 @@
3434

3535
public interface StructureGenerationConfig {
3636

37+
static StructureGenerationConfig standard() {
38+
return Sponge.game().factoryProvider().provide(Factory.class).standard();
39+
}
40+
41+
static StructureGenerationConfig flat() {
42+
return Sponge.game().factoryProvider().provide(Factory.class).flat();
43+
}
44+
45+
static StructureGenerationConfig none() {
46+
return Sponge.game().factoryProvider().provide(Factory.class).none();
47+
}
48+
3749
static Builder builder() {
38-
return Sponge.game().builderProvider().provide(Builder.class).reset();
50+
return Sponge.game().builderProvider().provide(Builder.class);
3951
}
4052

4153
Optional<SpacedStructureConfig> stronghold();
@@ -54,4 +66,13 @@ interface Builder extends org.spongepowered.api.util.Builder<StructureGeneration
5466

5567
Builder removeStructure(Structure structure);
5668
}
69+
70+
interface Factory {
71+
72+
StructureGenerationConfig standard();
73+
74+
StructureGenerationConfig flat();
75+
76+
StructureGenerationConfig none();
77+
}
5778
}

0 commit comments

Comments
 (0)