From f3f881960fc4c78b356806d76d40fc72c8d9e106 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 9 Jun 2021 01:57:34 +0200 Subject: [PATCH] Add basic Javadoc to BiomeModifications --- .../registry/BiomeModifications.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/common/src/main/java/me/shedaniel/architectury/registry/BiomeModifications.java b/common/src/main/java/me/shedaniel/architectury/registry/BiomeModifications.java index bd2e994f..e2fe24be 100644 --- a/common/src/main/java/me/shedaniel/architectury/registry/BiomeModifications.java +++ b/common/src/main/java/me/shedaniel/architectury/registry/BiomeModifications.java @@ -27,6 +27,26 @@ import net.minecraft.resources.ResourceLocation; import java.util.function.BiConsumer; import java.util.function.Predicate; +/** + * This class provides a cross-platform API to modify Biome features and properties. + * + *

Changes to the biomes are hereby done in four distinct "phases", akin to Fabric API's + * {@link net.fabricmc.fabric.api.biome.v1.ModificationPhase} enum. + * + *

The order in which these phases get processed is as follows, + * with the corresponding Forge EventPriority shown in brackets: + * + *

    + *
  1. {@link #addProperties(Predicate, BiConsumer) Adding} new features to biomes. [HIGH]
  2. + *
  3. {@link #removeProperties(Predicate, BiConsumer) Removing} existing features from biomes. [NORMAL]
  4. + *
  5. {@link #replaceProperties(Predicate, BiConsumer) Replacing} existing features with new ones. [LOW]
  6. + *
  7. Generic {@link #postProcessProperties(Predicate, BiConsumer) Post-Processing} of already modified biome features. [LOWEST]
  8. + *
+ * + * Keep in mind that it isn't strictly required that you use these phases accordingly + * (i.e., you may also add features during Post-Processing, for example); they mostly serve to + * add a predictable order to biome modifications. + */ public final class BiomeModifications { public static void addProperties(BiConsumer modifier) { BiomeModifications.addProperties(Predicates.alwaysTrue(), modifier);