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 LocationType
s 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 SpawnCondition
s.-
Field Summary
Modifier and TypeFieldDescriptionnet.minecraft.world.level.block.Block
The base block.net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>
The biome in which thelocation
sits.net.minecraft.world.entity.Entity
The 'cause' of thisSpawnLocation
.int
The area of space around thelocation
at which an entity can spawn.int
The light pokemonLevel at this block.TheMutableLocation
at which the entity would spawn.boolean
Whether or not there is a clear* line of sight from the base block to the world ceiling.The list ofLocationType
s that are satisfied a this location.Set<net.minecraft.world.level.block.Block>
A unique list of blocks surrounding this location. -
Constructor Summary
ConstructorDescriptionSpawnLocation
(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
TheMutableLocation
at which the entity would spawn. -
types
The list ofLocationType
s 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 thelocation
sits. -
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 thelocation
at 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