Package net.minecraft.entity
Class SpawnRestriction
java.lang.Object
net.minecraft.entity.SpawnRestriction
public class SpawnRestriction extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
SpawnRestriction.Entry
static class
SpawnRestriction.Location
static interface
SpawnRestriction.SpawnPredicate<T extends Entity>
-
Field Summary
Fields Modifier and Type Field Description private static Map<EntityType<?>,SpawnRestriction.Entry>
RESTRICTIONS
-
Constructor Summary
Constructors Constructor Description SpawnRestriction()
-
Method Summary
Modifier and Type Method Description static <T extends Entity>
booleancanSpawn(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>
voidregister(EntityType<T> type, SpawnRestriction.Location location, Heightmap.Type heightmapType, SpawnRestriction.SpawnPredicate<T> predicate)
-
Field Details
-
RESTRICTIONS
-
-
Constructor Details
-
SpawnRestriction
public SpawnRestriction()
-
-
Method Details
-
register
private static <T extends MobEntity> void register(EntityType<T> type, SpawnRestriction.Location location, Heightmap.Type heightmapType, SpawnRestriction.SpawnPredicate<T> predicate) -
getLocation
-
getHeightmapType
-
canSpawn
public static <T extends Entity> boolean canSpawn(EntityType<T> type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos pos, Random random)
-