Class BiomeCreator
java.lang.Object
de.freesoccerhdx.advancedworldcreatorapi.biome.BiomeCreator
- All Implemented Interfaces:
org.bukkit.Keyed
Represents a Creator for Biomes
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
Represents the created Biome with the NMS-Data stored -
Constructor Summary
ConstructorDescriptionBiomeCreator
(String namespace, String biomename) Creates a BiomeCreator with a customable Namespace + BiomenameBiomeCreator
(org.bukkit.plugin.Plugin plugin, String biomename) Creates a BiomeCreator with the given Plugin as Namespace and Biomename as Key -
Method Summary
Modifier and TypeMethodDescriptionboolean
addBiomeCarver
(BiomeFeatureType featureType, BiomeCarvers biomeCarver) Adds a Cave/Canyon-Type to the CustomBiome that will generate with Air/Liquidboolean
addBiomeDecoration
(BiomeDecorationType decorationType, BiomeDecoration biomeFeature) Adds a Decoration (ore, trees...) to the CustomBiomeboolean
addBiomeFeature
(BiomeDecorationType decorationType, CustomBiomeFeature biomeFeature) Adds a Decoration (ore, trees...) to the CustomBiomevoid
addCustomDecorationPopulator
(BiomeDecorationType biomeDecorationType, BiomeDecorationPopulator populator) Add aBiomeDecorationPopulator
that will be placed in the specific Biomeboolean
addEntityConfiguration
(BiomeEntity biomeEntity) Allows the specific Entity to spawn in this Biome seeaddEntityConfiguration(EntityType, int, int, int)
boolean
addEntityConfiguration
(org.bukkit.entity.EntityType type, int weight, int mincount, int maxcount) Allows the specific Entity to spawn in this BiomeCreates the CustomBiome without replacing an existing one seecreateBiome(boolean)
createBiome
(boolean replace) Creates the CustomBiome and replaces the existing one if replace=trueGets all addedBiomeCarvers
and theirBiomeFeatureType
of the CustomBiomeGets all currently added Decorations with their DecorationTypeGets all currently added Decorations with their DecorationTypeGets all the current whitelistedBiomeStructure
for the CustomBiomeorg.bukkit.Sound
Gets the Sound that will randomly play in the CustomBiome or null if not setgetBiomeCarvers
(BiomeFeatureType featureType) Gets a List ofBiomeCarvers
linked to theBiomeFeatureType
Gets all the current allowed Entitys with their SpawnData compacted asBiomeEntity
getBiomeFeatures
(BiomeDecorationType decorationType) Gets a List of added Decorations of the CustomBiomeGets theBiomeGrassColorModifier
of the CustomBiomeGets the currentBiomeCaveSound
for the CustomBiome or null if not setGets theBiomeCaveSoundSettings
that will be used for the CustomBiome or null if not setGets the currentBiomeMusic
of the CustomBiome or null if not setfloat
Gets the current Downfall of the CustomBiome.Gets the current Fog-Color of the CustomBiome.Gets the current Foliage-Color of the CustomBiome.Gets the current Grass-Color of the CustomBiome.org.bukkit.NamespacedKey
getKey()
Gets the specified Key(Namespace+Biomename) of the BiomeCreatorfloat
Gets the current MobSpawnProbability of the CustomBiomeGets theBiomeParticle
of the CustomBiome if it was setGets the currentBiomePrecipitation
to use for the CustomBiomeGets the current Sky-Color of the CustomBiome.float
Gets the current Temperature of the CustomBiome.Gets the currentBiomeTemperatureModifier
that is used for the CustomBiomeGets the current Water-Color of the CustomBiome.Gets the current Water-Fog-Color of the CustomBiome.boolean
isBiomeStructureAllowed
(BiomeStructure biomeStructure) Checks if the givenBiomeStructure
is allowed to Generate in the Worldvoid
setAllowedBiomeStructure
(BiomeStructure biomeStructure, boolean allowed) Whitelist/Blacklist a specificBiomeStructure
If BiomeStructure.VILLAGE is allowed it means it *can* spawn, but it still depends on terrain and World-Configuration!void
setAmbientParticle
(BiomeParticle particle) Sets theBiomeParticle
that will randomly appear in the CustomBiomevoid
setAmbientSound
(org.bukkit.Sound sound) Sets the Sound that will randomly play in the CustomBiomevoid
Sets theBiomeGrassColorModifier
that will be used for the GrassColor as modifier.void
setCaveSound
(BiomeCaveSound caveSound) Sets theBiomeCaveSound
that will play randomly in the undergroundvoid
setCaveSoundSettings
(BiomeCaveSoundSettings caveSoundSettings) Sets theBiomeCaveSoundSettings
for the CustomBiome It will randomly play the Sound in a random distance of the Player *scary*void
setCustomMusic
(BiomeMusic biomeMusic) Sets theBiomeMusic
that will randomly starts playing in the CustomBiomevoid
setCustomMusic
(org.bukkit.Sound sound, int min_delay, int max_delay, boolean replace_current_music) Sets theBiomeMusic
that will randomly starts playing in the CustomBiomevoid
setDownfall
(float val) Sets the Downfall of the CustomBiome.void
setFogColor
(Color col) Sets the color of the fog that starts far away from the playervoid
setFoliageColor
(Color col) Sets the color of the foliage(leaves, vines)void
setGrassColor
(Color col) Sets the color of Grass-Blocksvoid
setMobSpawnProbability
(float val) Sets the MobSpawn-Probability of the CustomBiome Larger values result in more Spawn-Attemps for Entitysvoid
Sets theBiomePrecipitation
to use for the CustomBiomevoid
setSkyColor
(Color col) Sets the color of the skyvoid
setTemperature
(float val) Sets the Temperature of the CustomBiome.void
Sets theBiomeTemperatureModifier
that should be used for the CustomBiomevoid
setWaterColor
(Color col) Sets the color of the watervoid
setWaterFogColor
(Color col) Sets the color of the water-fog that starts far away from the player under water
-
Constructor Details
-
BiomeCreator
Creates a BiomeCreator with the given Plugin as Namespace and Biomename as Key- Parameters:
plugin
- The Plugin to use (as namespace for the CustomBiome)biomename
- The Name of the Biome
-
BiomeCreator
Creates a BiomeCreator with a customable Namespace + Biomename- Parameters:
namespace
- A customable Namespace for the CustomBiome (like minecraft:)biomename
- The Name of the Biome
-
-
Method Details
-
getKey
public org.bukkit.NamespacedKey getKey()Gets the specified Key(Namespace+Biomename) of the BiomeCreator- Specified by:
getKey
in interfaceorg.bukkit.Keyed
- Returns:
- NamespacedKey
-
getAllowedBiomeStructures
Gets all the current whitelistedBiomeStructure
for the CustomBiome- Returns:
- java.util.List A list with whitelisted Structures
-
setAllowedBiomeStructure
Whitelist/Blacklist a specificBiomeStructure
If BiomeStructure.VILLAGE is allowed it means it *can* spawn, but it still depends on terrain and World-Configuration!- Parameters:
biomeStructure
- The specificBiomeStructure
allowed
- Whether the Structure is now allowed or not
-
isBiomeStructureAllowed
Checks if the givenBiomeStructure
is allowed to Generate in the World- Parameters:
biomeStructure
- The specificBiomeStructure
to check- Returns:
- If the Structure is allowed
-
setTemperature
public void setTemperature(float val) Sets the Temperature of the CustomBiome. This controls some Gameplay-Features like Snow-Golems taking damage.- Parameters:
val
- Value between 0.0 and 1.0
-
getTemperature
public float getTemperature()Gets the current Temperature of the CustomBiome.- Returns:
- The Temperature
-
setDownfall
public void setDownfall(float val) Sets the Downfall of the CustomBiome. This controls some Gameplay-Features like how fast fire burn out- Parameters:
val
- Value between 0.0 and 1.0
-
getDownfall
public float getDownfall()Gets the current Downfall of the CustomBiome.- Returns:
- The Downfall
-
setFoliageColor
Sets the color of the foliage(leaves, vines)- Parameters:
col
- The Color to use for this or null
-
getFoliageColor
Gets the current Foliage-Color of the CustomBiome.- Returns:
- The Foligae-Color or null
-
setWaterColor
Sets the color of the water- Parameters:
col
- The Color to use for this
-
getWaterColor
Gets the current Water-Color of the CustomBiome.- Returns:
- The Water-Color
-
setFogColor
Sets the color of the fog that starts far away from the player- Parameters:
col
- The Color to use for this
-
getFogColor
Gets the current Fog-Color of the CustomBiome.- Returns:
- The Fog-Color
-
setWaterFogColor
Sets the color of the water-fog that starts far away from the player under water- Parameters:
col
- The Color to use for this
-
getWaterFogColor
Gets the current Water-Fog-Color of the CustomBiome.- Returns:
- The Water-Fog-Color
-
setSkyColor
Sets the color of the sky- Parameters:
col
- The Color to use for this
-
getSkyColor
Gets the current Sky-Color of the CustomBiome.- Returns:
- The Sky-Color
-
setGrassColor
Sets the color of Grass-Blocks- Parameters:
col
- The Color to use for this
-
getGrassColor
Gets the current Grass-Color of the CustomBiome.- Returns:
- The Grass-Color
-
addEntityConfiguration
public boolean addEntityConfiguration(org.bukkit.entity.EntityType type, int weight, int mincount, int maxcount) Allows the specific Entity to spawn in this Biome- Parameters:
type
-EntityType
(EntityType that will be allowed)weight
- A value that is shared between all Entitys in the Biome (high value means more spawnchances)mincount
- Value that defines the minimum of trys to spawn a Entitymaxcount
- Value that defines the maximum of trys to spawn a Entity- Returns:
- Whether it was successful to add the Entity or not
-
addEntityConfiguration
Allows the specific Entity to spawn in this Biome seeaddEntityConfiguration(EntityType, int, int, int)
- Parameters:
biomeEntity
- The finalBiomeEntity
-Object- Returns:
- If the
BiomeEntity
was added or not
-
getBiomeEntities
Gets all the current allowed Entitys with their SpawnData compacted asBiomeEntity
- Returns:
- List with all
BiomeEntity
-
getPrecipitation
Gets the currentBiomePrecipitation
to use for the CustomBiome- Returns:
- The
BiomePrecipitation
-
setPrecipitation
Sets theBiomePrecipitation
to use for the CustomBiome- Parameters:
preci
- TheBiomePrecipitation
to use
-
getTemperatureModifier
Gets the currentBiomeTemperatureModifier
that is used for the CustomBiome- Returns:
- The
BiomeTemperatureModifier
to use
-
setTemperatureModifier
Sets theBiomeTemperatureModifier
that should be used for the CustomBiome- Parameters:
temp
- TheBiomeTemperatureModifier
to use
-
setBiomeGrassColorModifier
Sets theBiomeGrassColorModifier
that will be used for the GrassColor as modifier.- Parameters:
modifier
- TheBiomeGrassColorModifier
to use
-
getBiomeGrassColorModifier
Gets theBiomeGrassColorModifier
of the CustomBiome- Returns:
- The current BiomeGrassColorModifier
-
setMobSpawnProbability
public void setMobSpawnProbability(float val) Sets the MobSpawn-Probability of the CustomBiome Larger values result in more Spawn-Attemps for Entitys- Parameters:
val
- Value between 0.0 and 1.0
-
getMobSpawnProbability
public float getMobSpawnProbability()Gets the current MobSpawnProbability of the CustomBiome- Returns:
- Current MobSpawnProbability
-
addBiomeFeature
Adds a Decoration (ore, trees...) to the CustomBiome- Parameters:
biomeFeature
- Defines the Decoration to generate in the CustomBiomedecorationType
- Specifies the Type and how to generate the Decoration- Returns:
- If the BiomeDecoration was added or not.
-
addBiomeDecoration
Adds a Decoration (ore, trees...) to the CustomBiome- Parameters:
biomeFeature
- Defines the Decoration to generate in the CustomBiomedecorationType
- Specifies the Type and how to generate the Decoration- Returns:
- If the BiomeDecoration was added or not.
-
getBiomeFeatures
Gets a List of added Decorations of the CustomBiome- Parameters:
decorationType
- The DecorationType to search for- Returns:
- A List of
BiomeDecoration
for the given DecorationType or null
-
getAllCustomBiomeFeatures
Gets all currently added Decorations with their DecorationType- Returns:
- A Map of DecorationTypes with a List of added Decorations
-
getAllBiomeFeatures
Gets all currently added Decorations with their DecorationType- Returns:
- A Map of DecorationTypes with a List of added Decorations
-
addBiomeCarver
Adds a Cave/Canyon-Type to the CustomBiome that will generate with Air/Liquid- Parameters:
featureType
- Type(Air/Liquid) of the CarverbiomeCarver
- The Carver-Generation-Type- Returns:
- If the Carver was added or not
-
getBiomeCarvers
Gets a List ofBiomeCarvers
linked to theBiomeFeatureType
- Parameters:
featureType
- The FeatureType to search for- Returns:
- A List of Carvers for the given FeatureType
-
getAllBiomeCarvers
Gets all addedBiomeCarvers
and theirBiomeFeatureType
of the CustomBiome- Returns:
- A Map of
BiomeCarvers
linked to theBiomeFeatureType
-
setCustomMusic
public void setCustomMusic(org.bukkit.Sound sound, int min_delay, int max_delay, boolean replace_current_music) Sets theBiomeMusic
that will randomly starts playing in the CustomBiome- Parameters:
sound
- The Sound/Music to playmin_delay
- Minimum ticks before Music will startmax_delay
- Maximum ticks before Music will startreplace_current_music
- Whether it will replace active Music or not
-
setCustomMusic
Sets theBiomeMusic
that will randomly starts playing in the CustomBiome- Parameters:
biomeMusic
- seesetCustomMusic(Sound, int, int, boolean)
-
getCustomMusic
Gets the currentBiomeMusic
of the CustomBiome or null if not set- Returns:
- The BiomeMusic or null
-
setAmbientParticle
Sets theBiomeParticle
that will randomly appear in the CustomBiome- Parameters:
particle
- TheBiomeParticle
that will be used in the Biome
-
getParticle
Gets theBiomeParticle
of the CustomBiome if it was set- Returns:
- The BiomeParticle or null
-
setAmbientSound
public void setAmbientSound(org.bukkit.Sound sound) Sets the Sound that will randomly play in the CustomBiome- Parameters:
sound
- The Ambient-Sound
-
getAmbientSound
public org.bukkit.Sound getAmbientSound()Gets the Sound that will randomly play in the CustomBiome or null if not set- Returns:
- The Ambient-Sound or null
-
setCaveSound
Sets theBiomeCaveSound
that will play randomly in the underground- Parameters:
caveSound
- TheBiomeCaveSound
that will play randomly in the underground
-
getCaveSound
Gets the currentBiomeCaveSound
for the CustomBiome or null if not set- Returns:
- The
BiomeCaveSound
or null
-
setCaveSoundSettings
Sets theBiomeCaveSoundSettings
for the CustomBiome It will randomly play the Sound in a random distance of the Player *scary*- Parameters:
caveSoundSettings
- TheBiomeCaveSoundSettings
to use
-
getCaveSoundSettings
Gets theBiomeCaveSoundSettings
that will be used for the CustomBiome or null if not set- Returns:
- The
BiomeCaveSoundSettings
or null
-
addCustomDecorationPopulator
public void addCustomDecorationPopulator(BiomeDecorationType biomeDecorationType, BiomeDecorationPopulator populator) Add aBiomeDecorationPopulator
that will be placed in the specific Biome- Parameters:
biomeDecorationType
- TheBiomeDecorationType
to add the Populator topopulator
- TheBiomeDecorationPopulator
to add
-
createBiome
Creates the CustomBiome without replacing an existing one seecreateBiome(boolean)
- Returns:
- The CustomBiome that was created - or the existing one
-
createBiome
Creates the CustomBiome and replaces the existing one if replace=true- Parameters:
replace
- Whether to replace the existing CustomBiome with the new Settings or not- Returns:
- The CustomBiome that was created or replaced
-