Package net.minecraftforge.event.world
Class BiomeLoadingEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.world.BiomeLoadingEvent
public class BiomeLoadingEvent
extends net.minecraftforge.eventbus.api.Event
This event fires when a Biome is created from json or when a registered biome is re-created for worldgen.
It allows mods to edit a biome (like add a mob spawn) before it gets used for worldgen.
In order to maintain the most compatibility possible with other mods' modifications to a biome,
the event should be assigned a
EventPriority as follows:
- Additions to any list/map contained in a biome : EventPriority.HIGH
- Removals to any list/map contained in a biome : EventPriority.NORMAL
- Any other modification : EventPriority.LOW
Be aware that another mod could have done an operation beforehand, so an expected value out of a vanilla biome might not
always be the same, depending on other mods.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Biome.BiomeCategoryprivate Biome.ClimateSettingsprivate BiomeSpecialEffectsprivate final BiomeGenerationSettingsBuilderprivate final ResourceLocationprivate final MobSpawnSettingsBuilder -
Constructor Summary
ConstructorsConstructorDescriptionBiomeLoadingEvent(ResourceLocation name, Biome.ClimateSettings climate, Biome.BiomeCategory category, BiomeSpecialEffects effects, BiomeGenerationSettingsBuilder gen, MobSpawnSettingsBuilder spawns) -
Method Summary
Modifier and TypeMethodDescriptiongetName()This will get the registry name of the biome.voidsetCategory(Biome.BiomeCategory value) voidsetClimate(Biome.ClimateSettings value) voidsetEffects(BiomeSpecialEffects value) Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
name
-
climate
-
category
-
effects
-
gen
-
spawns
-
-
Constructor Details
-
BiomeLoadingEvent
public BiomeLoadingEvent(@Nullable ResourceLocation name, Biome.ClimateSettings climate, Biome.BiomeCategory category, BiomeSpecialEffects effects, BiomeGenerationSettingsBuilder gen, MobSpawnSettingsBuilder spawns)
-
-
Method Details
-
getName
This will get the registry name of the biome. It generally SHOULD NOT be null, but due to vanilla's biome handling and codec weirdness, there may be cases where it is. Do check for this possibility! -
getClimate
-
setClimate
-
getCategory
-
setCategory
-
getEffects
-
setEffects
-
getGeneration
-
getSpawns
-