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.EventThis 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 aEventPriorityas 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.LOWBe 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.Categorycategoryprivate Biome.Climateclimateprivate floatdepthprivate BiomeAmbienceeffectsprivate BiomeGenerationSettingsBuildergenprivate ResourceLocationnameprivate floatscaleprivate MobSpawnInfoBuilderspawns
-
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.CategorygetCategory()Biome.ClimategetClimate()floatgetDepth()BiomeAmbiencegetEffects()BiomeGenerationSettingsBuildergetGeneration()ResourceLocationgetName()This will get the registry name of the biome.floatgetScale()MobSpawnInfoBuildergetSpawns()voidsetCategory(Biome.Category value)voidsetClimate(Biome.Climate value)voidsetDepth(float value)voidsetEffects(BiomeAmbience value)voidsetScale(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()
-
-