Class ModifiableBiomeInfo
java.lang.Object
net.neoforged.neoforge.common.world.ModifiableBiomeInfo
Holds lazy-evaluable modified biome info.
Memoizers are not used because it's important to return null
without evaluating the biome info if it's accessed outside of a server context.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Record containing raw biome data. -
Field Summary
Modifier and TypeFieldDescriptionprivate @Nullable ModifiableBiomeInfo.BiomeInfo
private final ModifiableBiomeInfo.BiomeInfo
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyBiomeModifiers
(Holder<Biome> biome, List<BiomeModifier> biomeModifiers) Internal forge method; the game will crash if mods invoke this.get()
Returns The modified biome info if modified biome info has been generated, otherwise gets original biome info.@Nullable ModifiableBiomeInfo.BiomeInfo
Returns Modified biome info; null if it hasn't been set yet.Returns The original biome info that the associated biome was created with.
-
Field Details
-
originalBiomeInfo
-
modifiedBiomeInfo
-
-
Constructor Details
-
ModifiableBiomeInfo
- Parameters:
originalBiomeInfo
- BiomeInfo representing the original state of a biome when the biome was constructed.
-
-
Method Details
-
get
Returns The modified biome info if modified biome info has been generated, otherwise gets original biome info.- Returns:
- The modified biome info if modified biome info has been generated, otherwise gets original biome info
-
getOriginalBiomeInfo
Returns The original biome info that the associated biome was created with.- Returns:
- The original biome info that the associated biome was created with
-
getModifiedBiomeInfo
Returns Modified biome info; null if it hasn't been set yet.- Returns:
- Modified biome info; null if it hasn't been set yet
-
applyBiomeModifiers
Internal forge method; the game will crash if mods invoke this. Creates and caches the modified biome info.- Parameters:
biome
- named biome with original data.biomeModifiers
- biome modifiers to apply.- Throws:
IllegalStateException
- if invoked more than once.
-