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
Modifier and TypeFieldDescriptionprivate Biome.BiomeCategory
private Biome.ClimateSettings
private float
private BiomeSpecialEffects
private BiomeGenerationSettingsBuilder
private ResourceLocation
private float
private MobSpawnInfoBuilder
-
Constructor Summary
ConstructorDescriptionBiomeLoadingEvent(ResourceLocation name, Biome.ClimateSettings climate, Biome.BiomeCategory category, float depth, float scale, BiomeSpecialEffects effects, BiomeGenerationSettingsBuilder gen, MobSpawnInfoBuilder spawns)
-
Method Summary
Modifier and TypeMethodDescriptionfloat
getDepth()
getName()
This will get the registry name of the biome.float
getScale()
void
setCategory(Biome.BiomeCategory value)
void
setClimate(Biome.ClimateSettings value)
void
setDepth(float value)
void
setEffects(BiomeSpecialEffects value)
void
setScale(float 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
-
depth
private float depth -
scale
private float scale -
effects
-
gen
-
spawns
-
-
Constructor Details
-
BiomeLoadingEvent
public BiomeLoadingEvent(@Nullable ResourceLocation name, Biome.ClimateSettings climate, Biome.BiomeCategory category, float depth, float scale, BiomeSpecialEffects effects, BiomeGenerationSettingsBuilder gen, MobSpawnInfoBuilder 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
-
getDepth
public float getDepth() -
setDepth
public void setDepth(float value) -
getScale
public float getScale() -
setScale
public void setScale(float value) -
getEffects
-
setEffects
-
getGeneration
-
getSpawns
-