Add supplier overload for persisted biome type
import org.spongepowered.api.Sponge;
import org.spongepowered.api.util.CatalogBuilder;
+import java.util.function.Supplier;
+
/**
* A virtual biome is one which exists purely for generation and therefore
* requires no modifications to clients in order to use it. After generation for
@@ -81,6 +83,17 @@ static Builder builder() {
*/
Builder persistedType(BiomeType biome);
+ /**
+ * Sets the {@link BiomeType} that this virtual biome is persisted as
+ * after generation is complete.
+ *
+ * @param biome The persisted biome type
+ * @return This builder, for chaining
+ */
+ default Builder persistedType(Supplier<? extends BiomeType> biome) {
+ return this.persistedType(biome.get());
+ }
+
}
}
