Class SpawnCondition

java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.conditions.SpawnCondition

public class SpawnCondition extends Object
A condition for a particular SpawnInfo and SpawnLocation. To use an extension of this class in the JSON files, the targetedSpawnCondition must change to the relevant class during pre-initialization.

For all information about the options available check the wiki link below.

https://pixelmonmod.com/wiki/index.php?title=Better_Spawner/Spawn_Condition TODO: change to use dynamic conditions
  • Field Details

    • targetedSpawnCondition

      public static Class<? extends SpawnCondition> targetedSpawnCondition
    • times

      public ArrayList<WorldTime> times
      Cached list of biomes for faster access.
    • weathers

      public ArrayList<WeatherType> weathers
    • baseBlocks

      public Set<net.minecraft.tags.TagEntry> baseBlocks
    • neededNearbyBlocks

      public Set<net.minecraft.tags.TagEntry> neededNearbyBlocks
    • biomes

      public Set<net.minecraft.tags.TagEntry> biomes
    • cachedDimensions

      public transient Set<net.minecraft.resources.ResourceLocation> cachedDimensions
    • cachedWeathers

      public transient Set<WeatherType> cachedWeathers
    • tag

      public String tag
    • seesSky

      public Boolean seesSky
    • temperature

      public Float temperature
    • dimensions

      public ArrayList<String> dimensions
    • worlds

      public ArrayList<String> worlds
    • structures

      public ArrayList<String> structures
    • minX

      public Integer minX
    • maxX

      public Integer maxX
    • minY

      public Integer minY
    • maxY

      public Integer maxY
    • minZ

      public Integer minZ
    • maxZ

      public Integer maxZ
    • moonPhase

      public Integer moonPhase
    • minLightLevel

      public Integer minLightLevel
    • maxLightLevel

      public Integer maxLightLevel
  • Constructor Details

    • SpawnCondition

      public SpawnCondition()
  • Method Details

    • onExport

      public void onExport()
    • onImport

      public void onImport()
      To fill the transient (and convenient!) fields form the JSON friendly fields
    • fits

      public boolean fits(SpawnInfo spawnInfo, SpawnLocation spawnLocation)
      Checks if the given SpawnInfo and SpawnLocation satisfy this condition.