public class SpawnLocation
extends java.lang.Object
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.
Created by Hiroku
Modifier and Type | Field and Description |
---|---|
net.minecraft.block.Block |
baseBlock
The base block.
|
net.minecraft.world.biome.Biome |
biome
The biome in which the
location sits. |
net.minecraft.entity.Entity |
cause
The 'cause' of this
SpawnLocation . |
int |
diameter
The area of space around the
location at which an entity can spawn. |
EnumBerryFlavor |
flavor |
int |
light
The light level at this block.
|
MutableLocation |
location
The
MutableLocation at which the entity would spawn. |
boolean |
seesSky
Whether or not there is a clear* line of sight from the base block to the world ceiling.
|
java.util.Set<LocationType> |
types
The list of
LocationType s that are satisfied a this location. |
java.util.Set<net.minecraft.block.Block> |
uniqueSurroundingBlocks
A unique list of blocks surrounding this location.
|
Constructor and Description |
---|
SpawnLocation(net.minecraft.entity.Entity cause,
MutableLocation location,
java.util.Set<LocationType> types,
net.minecraft.block.Block baseBlock,
java.util.Set<net.minecraft.block.Block> uniqueSurroundingBlocks,
net.minecraft.world.biome.Biome biome,
boolean seesSky,
int diameter,
int light) |
SpawnLocation(MutableLocation location,
java.util.Set<LocationType> types,
net.minecraft.block.Block baseBlock,
java.util.Set<net.minecraft.block.Block> uniqueSurroundingBlocks,
net.minecraft.world.biome.Biome biome,
boolean seesSky,
int diameter,
int light) |
Modifier and Type | Method and Description |
---|---|
SpawnLocation |
clone() |
public net.minecraft.entity.Entity cause
SpawnLocation
. This can be null, but is generally a player.public MutableLocation location
MutableLocation
at which the entity would spawn.public java.util.Set<LocationType> types
LocationType
s that are satisfied a this location. This is never empty.public net.minecraft.block.Block baseBlock
public java.util.Set<net.minecraft.block.Block> uniqueSurroundingBlocks
public net.minecraft.world.biome.Biome biome
location
sits.public boolean seesSky
*Clear according to the seesSkyExceptions list in BetterSpawnerConfig
.
public int light
public int diameter
location
at which an entity can spawn. This does not count every
single nearby block but is still extremely unlikely to be wrong.public EnumBerryFlavor flavor
public SpawnLocation(MutableLocation location, java.util.Set<LocationType> types, net.minecraft.block.Block baseBlock, java.util.Set<net.minecraft.block.Block> uniqueSurroundingBlocks, net.minecraft.world.biome.Biome biome, boolean seesSky, int diameter, int light)
public SpawnLocation(net.minecraft.entity.Entity cause, MutableLocation location, java.util.Set<LocationType> types, net.minecraft.block.Block baseBlock, java.util.Set<net.minecraft.block.Block> uniqueSurroundingBlocks, net.minecraft.world.biome.Biome biome, boolean seesSky, int diameter, int light)
public SpawnLocation clone()
clone
in class java.lang.Object