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
Nested ClassesModifier and TypeClassDescriptionstatic final record
Record containing raw biome data. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private @Nullable ModifiableBiomeInfo.BiomeInfo
private final ModifiableBiomeInfo.BiomeInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyBiomeModifiers
(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, List<BiomeModifier> biomeModifiers, net.minecraft.core.RegistryAccess registryAccess) Internal NeoForge method.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
-
LOGGER
private static final org.slf4j.Logger LOGGER -
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 public boolean applyBiomeModifiers(net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, List<BiomeModifier> biomeModifiers, net.minecraft.core.RegistryAccess registryAccess) Internal NeoForge method. Will do nothing if this modifier had already been applied. Creates and caches the modified biome info.- Parameters:
biome
- named biome with original data.biomeModifiers
- biome modifiers to apply.- Returns:
- whether the biome's network-synced data was modified
-