public class SpawnCondition
extends java.lang.Object
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 conditionsModifier and Type | Field and Description |
---|---|
java.util.Set<net.minecraft.util.ResourceLocation> |
biomes |
java.util.Set<net.minecraft.block.Block> |
cachedBaseBlocks |
java.util.Set<net.minecraft.util.ResourceLocation> |
cachedDimensions |
java.util.Set<net.minecraft.block.Block> |
cachedNeededNearbyBlocks |
java.util.Set<WeatherType> |
cachedWeathers |
java.util.ArrayList<java.lang.String> |
dimensions |
java.lang.Integer |
maxLightLevel |
java.lang.Integer |
maxX |
java.lang.Integer |
maxY |
java.lang.Integer |
maxZ |
java.lang.Integer |
minLightLevel |
java.lang.Integer |
minX |
java.lang.Integer |
minY |
java.lang.Integer |
minZ |
java.lang.Integer |
moonPhase |
java.lang.Boolean |
seesSky |
java.util.ArrayList<java.lang.String> |
structures |
java.lang.String |
tag |
static java.lang.Class<? extends SpawnCondition> |
targetedSpawnCondition |
java.lang.Float |
temperature |
java.util.ArrayList<WorldTime> |
times
Cached list of biomes for faster access.
|
Constructor and Description |
---|
SpawnCondition() |
Modifier and Type | Method and Description |
---|---|
static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> |
cacheRegistry(net.minecraft.util.RegistryKey<? extends net.minecraft.util.registry.Registry<T>> key,
java.util.ArrayList<java.lang.String> from,
java.util.Collection<net.minecraft.util.ResourceLocation> to,
java.util.HashMap<java.lang.String,java.util.Set<T>> categories,
java.util.function.Function<T,net.minecraft.util.ResourceLocation> mapper) |
static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> |
cacheRegistry(net.minecraft.util.RegistryKey<? extends net.minecraft.util.registry.Registry<T>> key,
java.util.ArrayList<java.lang.String> from,
java.util.Collection<T> to,
java.util.HashMap<java.lang.String,java.util.Set<T>> categories) |
boolean |
fits(SpawnInfo spawnInfo,
SpawnLocation spawnLocation)
Checks if the given
SpawnInfo and SpawnLocation satisfy this condition. |
void |
onExport() |
void |
onImport()
To fill the transient (and convenient!) fields form the JSON friendly fields
|
public static java.lang.Class<? extends SpawnCondition> targetedSpawnCondition
public java.util.ArrayList<WorldTime> times
public transient java.util.Set<WeatherType> cachedWeathers
public transient java.util.Set<net.minecraft.block.Block> cachedBaseBlocks
public transient java.util.Set<net.minecraft.block.Block> cachedNeededNearbyBlocks
public transient java.util.Set<net.minecraft.util.ResourceLocation> biomes
public transient java.util.Set<net.minecraft.util.ResourceLocation> cachedDimensions
public java.lang.String tag
public java.lang.Boolean seesSky
public java.lang.Float temperature
public java.util.ArrayList<java.lang.String> dimensions
public java.util.ArrayList<java.lang.String> structures
public java.lang.Integer minX
public java.lang.Integer maxX
public java.lang.Integer minY
public java.lang.Integer maxY
public java.lang.Integer minZ
public java.lang.Integer maxZ
public java.lang.Integer moonPhase
public java.lang.Integer minLightLevel
public java.lang.Integer maxLightLevel
public void onExport()
public static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> void cacheRegistry(net.minecraft.util.RegistryKey<? extends net.minecraft.util.registry.Registry<T>> key, java.util.ArrayList<java.lang.String> from, java.util.Collection<T> to, java.util.HashMap<java.lang.String,java.util.Set<T>> categories)
public static <T extends net.minecraftforge.registries.IForgeRegistryEntry<T>> void cacheRegistry(net.minecraft.util.RegistryKey<? extends net.minecraft.util.registry.Registry<T>> key, java.util.ArrayList<java.lang.String> from, java.util.Collection<net.minecraft.util.ResourceLocation> to, java.util.HashMap<java.lang.String,java.util.Set<T>> categories, java.util.function.Function<T,net.minecraft.util.ResourceLocation> mapper)
public void onImport()
public boolean fits(SpawnInfo spawnInfo, SpawnLocation spawnLocation)
SpawnInfo
and SpawnLocation
satisfy this condition.