public class SpawnRestriction extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
SpawnRestriction.Entry |
static class |
SpawnRestriction.Location |
static interface |
SpawnRestriction.SpawnPredicate<T extends Entity> |
| Modifier and Type | Field and Description |
|---|---|
private static Map<EntityType<?>,SpawnRestriction.Entry> |
RESTRICTIONS |
| Constructor and Description |
|---|
SpawnRestriction() |
| Modifier and Type | Method and Description |
|---|---|
static <T extends Entity> |
canSpawn(EntityType<T> type,
ServerWorldAccess serverWorldAccess,
SpawnReason spawnReason,
BlockPos pos,
Random random) |
static Heightmap.Type |
getHeightmapType(EntityType<?> type) |
static SpawnRestriction.Location |
getLocation(EntityType<?> type) |
private static <T extends MobEntity> |
register(EntityType<T> type,
SpawnRestriction.Location location,
Heightmap.Type heightmapType,
SpawnRestriction.SpawnPredicate<T> predicate) |
private static final Map<EntityType<?>,SpawnRestriction.Entry> RESTRICTIONS
private static <T extends MobEntity> void register(EntityType<T> type, SpawnRestriction.Location location, Heightmap.Type heightmapType, SpawnRestriction.SpawnPredicate<T> predicate)
public static SpawnRestriction.Location getLocation(EntityType<?> type)
public static Heightmap.Type getHeightmapType(@Nullable EntityType<?> type)
public static <T extends Entity> boolean canSpawn(EntityType<T> type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos pos, Random random)