java.lang.Object
de.freesoccerhdx.advancedworldcreatorapi.biome.BiomeCreator
All Implemented Interfaces:
org.bukkit.Keyed

public class BiomeCreator extends Object implements org.bukkit.Keyed
Represents a Creator for Biomes
  • Constructor Details

    • BiomeCreator

      public BiomeCreator(org.bukkit.plugin.Plugin plugin, String biomename)
      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

      public BiomeCreator(String namespace, String biomename)
      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 interface org.bukkit.Keyed
      Returns:
      NamespacedKey
    • getAllowedBiomeStructures

      public List<BiomeStructure> getAllowedBiomeStructures()
      Gets all the current whitelisted BiomeStructure for the CustomBiome
      Returns:
      java.util.List A list with whitelisted Structures
    • setAllowedBiomeStructure

      public void setAllowedBiomeStructure(BiomeStructure biomeStructure, boolean allowed)
      Whitelist/Blacklist a specific BiomeStructure If BiomeStructure.VILLAGE is allowed it means it *can* spawn, but it still depends on terrain and World-Configuration!
      Parameters:
      biomeStructure - The specific BiomeStructure
      allowed - Whether the Structure is now allowed or not
    • isBiomeStructureAllowed

      public boolean isBiomeStructureAllowed(BiomeStructure biomeStructure)
      Checks if the given BiomeStructure is allowed to Generate in the World
      Parameters:
      biomeStructure - The specific BiomeStructure 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

      public void setFoliageColor(Color col)
      Sets the color of the foliage(leaves, vines)
      Parameters:
      col - The Color to use for this or null
    • getFoliageColor

      public Color getFoliageColor()
      Gets the current Foliage-Color of the CustomBiome.
      Returns:
      The Foligae-Color or null
    • setWaterColor

      public void setWaterColor(Color col)
      Sets the color of the water
      Parameters:
      col - The Color to use for this
    • getWaterColor

      public Color getWaterColor()
      Gets the current Water-Color of the CustomBiome.
      Returns:
      The Water-Color
    • setFogColor

      public void setFogColor(Color col)
      Sets the color of the fog that starts far away from the player
      Parameters:
      col - The Color to use for this
    • getFogColor

      public Color getFogColor()
      Gets the current Fog-Color of the CustomBiome.
      Returns:
      The Fog-Color
    • setWaterFogColor

      public void setWaterFogColor(Color col)
      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

      public Color getWaterFogColor()
      Gets the current Water-Fog-Color of the CustomBiome.
      Returns:
      The Water-Fog-Color
    • setSkyColor

      public void setSkyColor(Color col)
      Sets the color of the sky
      Parameters:
      col - The Color to use for this
    • getSkyColor

      public Color getSkyColor()
      Gets the current Sky-Color of the CustomBiome.
      Returns:
      The Sky-Color
    • setGrassColor

      public void setGrassColor(Color col)
      Sets the color of Grass-Blocks
      Parameters:
      col - The Color to use for this
    • getGrassColor

      public Color 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 Entity
      maxcount - Value that defines the maximum of trys to spawn a Entity
      Returns:
      Whether it was successful to add the Entity or not
    • addEntityConfiguration

      public boolean addEntityConfiguration(BiomeEntity biomeEntity)
      Allows the specific Entity to spawn in this Biome see addEntityConfiguration(EntityType, int, int, int)
      Parameters:
      biomeEntity - The final BiomeEntity-Object
      Returns:
      If the BiomeEntity was added or not
    • getBiomeEntities

      public List<BiomeEntity> getBiomeEntities()
      Gets all the current allowed Entitys with their SpawnData compacted as BiomeEntity
      Returns:
      List with all BiomeEntity
    • getPrecipitation

      public BiomePrecipitation getPrecipitation()
      Gets the current BiomePrecipitation to use for the CustomBiome
      Returns:
      The BiomePrecipitation
    • setPrecipitation

      public void setPrecipitation(BiomePrecipitation preci)
      Sets the BiomePrecipitation to use for the CustomBiome
      Parameters:
      preci - The BiomePrecipitation to use
    • getTemperatureModifier

      public BiomeTemperatureModifier getTemperatureModifier()
      Gets the current BiomeTemperatureModifier that is used for the CustomBiome
      Returns:
      The BiomeTemperatureModifier to use
    • setTemperatureModifier

      public void setTemperatureModifier(BiomeTemperatureModifier temp)
      Sets the BiomeTemperatureModifier that should be used for the CustomBiome
      Parameters:
      temp - The BiomeTemperatureModifier to use
    • setBiomeGrassColorModifier

      public void setBiomeGrassColorModifier(BiomeGrassColorModifier modifier)
      Sets the BiomeGrassColorModifier that will be used for the GrassColor as modifier.
      Parameters:
      modifier - The BiomeGrassColorModifier to use
    • getBiomeGrassColorModifier

      public BiomeGrassColorModifier getBiomeGrassColorModifier()
      Gets the BiomeGrassColorModifier 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

      public boolean addBiomeFeature(BiomeDecorationType decorationType, CustomBiomeFeature biomeFeature)
      Adds a Decoration (ore, trees...) to the CustomBiome
      Parameters:
      biomeFeature - Defines the Decoration to generate in the CustomBiome
      decorationType - Specifies the Type and how to generate the Decoration
      Returns:
      If the BiomeDecoration was added or not.
    • addBiomeDecoration

      public boolean addBiomeDecoration(BiomeDecorationType decorationType, BiomeDecoration biomeFeature)
      Adds a Decoration (ore, trees...) to the CustomBiome
      Parameters:
      biomeFeature - Defines the Decoration to generate in the CustomBiome
      decorationType - Specifies the Type and how to generate the Decoration
      Returns:
      If the BiomeDecoration was added or not.
    • getBiomeFeatures

      public List<BiomeDecoration> getBiomeFeatures(BiomeDecorationType decorationType)
      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

      public HashMap<BiomeDecorationType,List<CustomBiomeFeature>> getAllCustomBiomeFeatures()
      Gets all currently added Decorations with their DecorationType
      Returns:
      A Map of DecorationTypes with a List of added Decorations
    • getAllBiomeFeatures

      public HashMap<BiomeDecorationType,List<BiomeDecoration>> getAllBiomeFeatures()
      Gets all currently added Decorations with their DecorationType
      Returns:
      A Map of DecorationTypes with a List of added Decorations
    • addBiomeCarver

      public boolean addBiomeCarver(BiomeFeatureType featureType, BiomeCarvers biomeCarver)
      Adds a Cave/Canyon-Type to the CustomBiome that will generate with Air/Liquid
      Parameters:
      featureType - Type(Air/Liquid) of the Carver
      biomeCarver - The Carver-Generation-Type
      Returns:
      If the Carver was added or not
    • getBiomeCarvers

      public List<BiomeCarvers> getBiomeCarvers(BiomeFeatureType featureType)
      Gets a List of BiomeCarvers linked to the BiomeFeatureType
      Parameters:
      featureType - The FeatureType to search for
      Returns:
      A List of Carvers for the given FeatureType
    • getAllBiomeCarvers

      public HashMap<BiomeFeatureType,List<BiomeCarvers>> getAllBiomeCarvers()
      Gets all added BiomeCarvers and their BiomeFeatureType of the CustomBiome
      Returns:
      A Map of BiomeCarvers linked to the BiomeFeatureType
    • setCustomMusic

      public void setCustomMusic(org.bukkit.Sound sound, int min_delay, int max_delay, boolean replace_current_music)
      Sets the BiomeMusic that will randomly starts playing in the CustomBiome
      Parameters:
      sound - The Sound/Music to play
      min_delay - Minimum ticks before Music will start
      max_delay - Maximum ticks before Music will start
      replace_current_music - Whether it will replace active Music or not
    • setCustomMusic

      public void setCustomMusic(BiomeMusic biomeMusic)
      Sets the BiomeMusic that will randomly starts playing in the CustomBiome
      Parameters:
      biomeMusic - see setCustomMusic(Sound, int, int, boolean)
    • getCustomMusic

      public BiomeMusic getCustomMusic()
      Gets the current BiomeMusic of the CustomBiome or null if not set
      Returns:
      The BiomeMusic or null
    • setAmbientParticle

      public void setAmbientParticle(BiomeParticle particle)
      Sets the BiomeParticle that will randomly appear in the CustomBiome
      Parameters:
      particle - The BiomeParticle that will be used in the Biome
    • getParticle

      public BiomeParticle getParticle()
      Gets the BiomeParticle 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

      public void setCaveSound(BiomeCaveSound caveSound)
      Sets the BiomeCaveSound that will play randomly in the underground
      Parameters:
      caveSound - The BiomeCaveSound that will play randomly in the underground
    • getCaveSound

      public BiomeCaveSound getCaveSound()
      Gets the current BiomeCaveSound for the CustomBiome or null if not set
      Returns:
      The BiomeCaveSound or null
    • setCaveSoundSettings

      public void setCaveSoundSettings(BiomeCaveSoundSettings caveSoundSettings)
      Sets the BiomeCaveSoundSettings for the CustomBiome It will randomly play the Sound in a random distance of the Player *scary*
      Parameters:
      caveSoundSettings - The BiomeCaveSoundSettings to use
    • getCaveSoundSettings

      public BiomeCaveSoundSettings getCaveSoundSettings()
      Gets the BiomeCaveSoundSettings 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 a BiomeDecorationPopulator that will be placed in the specific Biome
      Parameters:
      biomeDecorationType - The BiomeDecorationType to add the Populator to
      populator - The BiomeDecorationPopulator to add
    • createBiome

      public BiomeCreator.CustomBiome createBiome()
      Creates the CustomBiome without replacing an existing one see createBiome(boolean)
      Returns:
      The CustomBiome that was created - or the existing one
    • createBiome

      public BiomeCreator.CustomBiome createBiome(boolean replace)
      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