Package net.minecraft.world.entity
Class SpawnPlacements
java.lang.Object
net.minecraft.world.entity.SpawnPlacements
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final recordstatic interfaceSpawnPlacements.SpawnPredicate<T extends Entity> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Entity>
booleancheckSpawnRules(EntityType<T> pEntityType, ServerLevelAccessor pLevel, EntitySpawnReason pSpawnReason, BlockPos pPos, RandomSource pRandom) static voidNeo: Purely for Neo usage to fire off the spawn registering events.static Heightmap.TypesgetHeightmapType(EntityType<?> pEntityType) static SpawnPlacementTypegetPlacementType(EntityType<?> pEntityType) static booleanhasPlacement(EntityType<?> type) static booleanisSpawnPositionOk(EntityType<?> pEntityType, LevelReader pLevel, BlockPos pPos) private static <T extends Mob>
voidregister(EntityType<T> pEntityType, SpawnPlacementType pSpawnPlacementType, Heightmap.Types pHeightmapType, SpawnPlacements.SpawnPredicate<T> pPredicate) Deprecated.
-
Field Details
-
DATA_BY_TYPE
-
-
Constructor Details
-
SpawnPlacements
public SpawnPlacements()
-
-
Method Details
-
register
@Deprecated private static <T extends Mob> void register(EntityType<T> pEntityType, SpawnPlacementType pSpawnPlacementType, Heightmap.Types pHeightmapType, SpawnPlacements.SpawnPredicate<T> pPredicate) Deprecated.Neo: Modders should useRegisterSpawnPlacementsEventinstead. -
getPlacementType
-
isSpawnPositionOk
public static boolean isSpawnPositionOk(EntityType<?> pEntityType, LevelReader pLevel, BlockPos pPos) -
getHeightmapType
-
checkSpawnRules
public static <T extends Entity> boolean checkSpawnRules(EntityType<T> pEntityType, ServerLevelAccessor pLevel, EntitySpawnReason pSpawnReason, BlockPos pPos, RandomSource pRandom) -
hasPlacement
-
fireSpawnPlacementEvent
@Internal public static void fireSpawnPlacementEvent()Neo: Purely for Neo usage to fire off the spawn registering events.
-
RegisterSpawnPlacementsEventinstead.