Class SpawnLocation
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.SpawnLocation
A location at which an entity could feasibly spawn. The contract demands that a nullable 'cause' of a location,
MutableLocation, a list of LocationTypes that it satisfies, the base block, a distinct list of
the blocks within its diameter, the biome, whether or not it can see the sky, and the diameter of the spawn location
(i.e. how much room exists for the spawned entity around this location) be provided. All of this information should
be provided to maximise the utility of SpawnConditions.-
Field Summary
FieldsModifier and TypeFieldDescriptionnet.minecraft.world.level.block.BlockThe base block.net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> The biome in which thelocationsits.net.minecraft.world.entity.EntityThe 'cause' of thisSpawnLocation.intThe area of space around thelocationat which an entity can spawn.intThe light pokemonLevel at this block.TheMutableLocationat which the entity would spawn.booleanWhether or not there is a clear* line of sight from the base block to the world ceiling.The list ofLocationTypes that are satisfied a this location.Set<net.minecraft.world.level.block.Block> A unique list of blocks surrounding this location. -
Constructor Summary
ConstructorsConstructorDescriptionSpawnLocation(MutableLocation location, Set<LocationType> types, net.minecraft.world.level.block.Block baseBlock, Set<net.minecraft.world.level.block.Block> uniqueSurroundingBlocks, net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, boolean seesSky, int diameter, int light) SpawnLocation(net.minecraft.world.entity.Entity cause, MutableLocation location, Set<LocationType> types, net.minecraft.world.level.block.Block baseBlock, Set<net.minecraft.world.level.block.Block> uniqueSurroundingBlocks, net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, boolean seesSky, int diameter, int light) -
Method Summary
-
Field Details
-
cause
public net.minecraft.world.entity.Entity causeThe 'cause' of thisSpawnLocation. This can be null, but is generally a player. -
location
TheMutableLocationat which the entity would spawn. -
types
The list ofLocationTypes that are satisfied a this location. This is never empty. -
baseBlock
public net.minecraft.world.level.block.Block baseBlockThe base block. This is generally the block the entity will spawn on but different spawners may have different definitions. For example, Rock Smash's implementation defines the block being broken as the base block, while fishing states the block the whatever block of fluid the hook is inside. -
uniqueSurroundingBlocks
-
biome
public net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biomeThe biome in which thelocationsits. -
seesSky
public boolean seesSkyWhether or not there is a clear* line of sight from the base block to the world ceiling.*Clear according to the seesSkyExceptions list in
BetterSpawnerConfig. -
light
public int lightThe light pokemonLevel at this block. -
diameter
public int diameterThe area of space around thelocationat which an entity can spawn. This does not count every single nearby block but is still extremely unlikely to be wrong. -
flavor
-
-
Constructor Details
-
SpawnLocation
public SpawnLocation(MutableLocation location, Set<LocationType> types, net.minecraft.world.level.block.Block baseBlock, Set<net.minecraft.world.level.block.Block> uniqueSurroundingBlocks, net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, boolean seesSky, int diameter, int light) -
SpawnLocation
public SpawnLocation(net.minecraft.world.entity.Entity cause, MutableLocation location, Set<LocationType> types, net.minecraft.world.level.block.Block baseBlock, Set<net.minecraft.world.level.block.Block> uniqueSurroundingBlocks, net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> biome, boolean seesSky, int diameter, int light)
-
-
Method Details