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 aEventPriority
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.
-
-
Field Summary
Fields Modifier and Type Field Description private Biome.Category
category
private Biome.Climate
climate
private float
depth
private BiomeAmbience
effects
private BiomeGenerationSettingsBuilder
gen
private ResourceLocation
name
private float
scale
private MobSpawnInfoBuilder
spawns
-
Constructor Summary
Constructors Constructor Description BiomeLoadingEvent(ResourceLocation name, Biome.Climate climate, Biome.Category category, float depth, float scale, BiomeAmbience effects, BiomeGenerationSettingsBuilder gen, MobSpawnInfoBuilder spawns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Biome.Category
getCategory()
Biome.Climate
getClimate()
float
getDepth()
BiomeAmbience
getEffects()
BiomeGenerationSettingsBuilder
getGeneration()
ResourceLocation
getName()
This will get the registry name of the biome.float
getScale()
MobSpawnInfoBuilder
getSpawns()
void
setCategory(Biome.Category value)
void
setClimate(Biome.Climate value)
void
setDepth(float value)
void
setEffects(BiomeAmbience value)
void
setScale(float value)
-
-
-
Field Detail
-
name
private final ResourceLocation name
-
climate
private Biome.Climate climate
-
category
private Biome.Category category
-
depth
private float depth
-
scale
private float scale
-
effects
private BiomeAmbience effects
-
gen
private final BiomeGenerationSettingsBuilder gen
-
spawns
private final MobSpawnInfoBuilder spawns
-
-
Constructor Detail
-
BiomeLoadingEvent
public BiomeLoadingEvent(@Nullable ResourceLocation name, Biome.Climate climate, Biome.Category category, float depth, float scale, BiomeAmbience effects, BiomeGenerationSettingsBuilder gen, MobSpawnInfoBuilder spawns)
-
-
Method Detail
-
getName
@Nullable public ResourceLocation 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
public Biome.Climate getClimate()
-
setClimate
public void setClimate(Biome.Climate value)
-
getCategory
public Biome.Category getCategory()
-
setCategory
public void setCategory(Biome.Category value)
-
getDepth
public float getDepth()
-
setDepth
public void setDepth(float value)
-
getScale
public float getScale()
-
setScale
public void setScale(float value)
-
getEffects
public BiomeAmbience getEffects()
-
setEffects
public void setEffects(BiomeAmbience value)
-
getGeneration
public BiomeGenerationSettingsBuilder getGeneration()
-
getSpawns
public MobSpawnInfoBuilder getSpawns()
-
-