Uses of Enum Class
net.minecraft.world.entity.EntitySpawnReason
Packages that use EntitySpawnReason
Package
Description
-
Uses of EntitySpawnReason in net.minecraft.util
Methods in net.minecraft.util with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionSpawnUtil.trySpawnMob(EntityType<T> entityType, EntitySpawnReason spawnReason, ServerLevel level, BlockPos pos, int attempts, int range, int yOffset, SpawnUtil.Strategy strategy, boolean checkCollision) -
Uses of EntitySpawnReason in net.minecraft.world.entity
Fields in net.minecraft.world.entity declared as EntitySpawnReasonMethods in net.minecraft.world.entity that return EntitySpawnReasonModifier and TypeMethodDescriptionfinal EntitySpawnReasonMob.getSpawnType()Returns the type of spawn that created this mob, if applicable.static EntitySpawnReasonReturns the enum constant of this class with the specified name.static EntitySpawnReason[]EntitySpawnReason.values()Returns an array containing the constants of this enum class, in the order they are declared.Methods in net.minecraft.world.entity with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanGlowSquid.checkGlowSquidSpawnRules(EntityType<? extends LivingEntity> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanMob.checkMobSpawnRules(EntityType<? extends Mob> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) booleanMob.checkSpawnRules(LevelAccessor level, EntitySpawnReason spawnReason) booleanPathfinderMob.checkSpawnRules(LevelAccessor level, EntitySpawnReason spawnReason) static <T extends Entity>
booleanSpawnPlacements.checkSpawnRules(EntityType<T> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) <T extends Mob>
TMob.convertTo(EntityType<T> entityType, ConversionParams conversionParams, EntitySpawnReason spawnReason, ConversionParams.AfterConversion<T> afterConversion) EntityType.create(ServerLevel level, Consumer<T> consumer, BlockPos pos, EntitySpawnReason reason, boolean shouldOffsetY, boolean shouldOffsetYMore) EntityType.create(Level level, EntitySpawnReason spawnReason) EntityType.create(ValueInput input, Level level, EntitySpawnReason spawnReason) AgeableMob.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Mob.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Deprecated.Override-Only.static booleanEntitySpawnReason.ignoresLightRequirements(EntitySpawnReason reason) static booleanEntitySpawnReason.isSpawner(EntitySpawnReason reason) EntityType.loadEntitiesRecursive(ValueInput.ValueInputList input, Level level, EntitySpawnReason spawnReason) static EntityEntityType.loadEntityRecursive(CompoundTag entityTag, Level level, EntitySpawnReason spawnReason, Function<Entity, Entity> adapter) static EntityEntityType.loadEntityRecursive(ValueInput input, Level level, EntitySpawnReason spawnReason, Function<Entity, Entity> adapter) EntityType.loadStaticEntity(ValueInput input, Level level, EntitySpawnReason spawnReason) EntityType.spawn(ServerLevel level, Consumer<T> consumer, BlockPos pos, EntitySpawnReason reason, boolean shouldOffsetY, boolean shouldOffsetYMore) EntityType.spawn(ServerLevel level, BlockPos pos, EntitySpawnReason reason) EntityType.spawn(ServerLevel level, ItemStack spawnedFrom, LivingEntity owner, BlockPos pos, EntitySpawnReason reason, boolean shouldOffsetY, boolean shouldOffsetYMore) booleanSpawnPlacements.SpawnPredicate.test(EntityType<T> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) -
Uses of EntitySpawnReason in net.minecraft.world.entity.ambient
Methods in net.minecraft.world.entity.ambient with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanBat.checkBatSpawnRules(EntityType<Bat> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource randomSource) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal
Methods in net.minecraft.world.entity.animal with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanAnimal.checkAnimalSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanFox.checkFoxSpawnRules(EntityType<Fox> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanMushroomCow.checkMushroomSpawnRules(EntityType<MushroomCow> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanOcelot.checkOcelotSpawnRules(EntityType<Ocelot> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanParrot.checkParrotSpawnRules(EntityType<Parrot> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanPolarBear.checkPolarBearSpawnRules(EntityType<PolarBear> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanRabbit.checkRabbitSpawnRules(EntityType<Rabbit> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanAgeableWaterCreature.checkSurfaceAgeableWaterCreatureSpawnRules(EntityType<? extends AgeableWaterCreature> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanWaterAnimal.checkSurfaceWaterAnimalSpawnRules(EntityType<? extends WaterAnimal> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanTropicalFish.checkTropicalFishSpawnRules(EntityType<TropicalFish> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanTurtle.checkTurtleSpawnRules(EntityType<Turtle> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) AbstractSchoolingFish.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Cat.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Chicken.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Cow.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Dolphin.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Fox.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Ocelot.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Panda.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Parrot.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Pig.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) PolarBear.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Rabbit.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Salmon.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Squid.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) TropicalFish.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Turtle.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.armadillo
Methods in net.minecraft.world.entity.animal.armadillo with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanArmadillo.checkArmadilloSpawnRules(EntityType<Armadillo> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.axolotl
Methods in net.minecraft.world.entity.animal.axolotl with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanAxolotl.checkAxolotlSpawnRules(EntityType<? extends LivingEntity> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Axolotl.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.camel
Methods in net.minecraft.world.entity.animal.camel with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanCamel.checkCamelSpawnRules(EntityType<Camel> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Camel.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.frog
Methods in net.minecraft.world.entity.animal.frog with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanFrog.checkFrogSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Frog.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.goat
Methods in net.minecraft.world.entity.animal.goat with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanGoat.checkGoatSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Goat.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.horse
Methods in net.minecraft.world.entity.animal.horse with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanSkeletonHorse.checkSkeletonHorseSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanZombieHorse.checkZombieHorseSpawnRules(EntityType<? extends Animal> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) AbstractHorse.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Horse.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Llama.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) TraderLlama.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.sheep
Methods in net.minecraft.world.entity.animal.sheep with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionSheep.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.animal.wolf
Methods in net.minecraft.world.entity.animal.wolf with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanWolf.checkWolfSpawnRules(EntityType<Wolf> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Wolf.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.monster
Methods in net.minecraft.world.entity.monster with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanMonster.checkAnyLightMonsterSpawnRules(EntityType<? extends Monster> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanDrowned.checkDrownedSpawnRules(EntityType<Drowned> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanEndermite.checkEndermiteSpawnRules(EntityType<Endermite> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanGhast.checkGhastSpawnRules(EntityType<Ghast> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanGuardian.checkGuardianSpawnRules(EntityType<? extends Guardian> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanHusk.checkHuskSpawnRules(EntityType<Husk> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanMagmaCube.checkMagmaCubeSpawnRules(EntityType<MagmaCube> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanMonster.checkMonsterSpawnRules(EntityType<? extends Monster> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanPatrollingMonster.checkPatrollingMonsterSpawnRules(EntityType<? extends PatrollingMonster> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource randomSource) static booleanSilverfish.checkSilverfishSpawnRules(EntityType<Silverfish> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanSlime.checkSlimeSpawnRules(EntityType<Slime> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanStray.checkStraySpawnRules(EntityType<Stray> entityType, ServerLevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanStrider.checkStriderSpawnRules(EntityType<Strider> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) static booleanZombifiedPiglin.checkZombifiedPiglinSpawnRules(EntityType<ZombifiedPiglin> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) AbstractSkeleton.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) CaveSpider.finalizeSpawn(ServerLevelAccessor p_32259_, DifficultyInstance p_32260_, EntitySpawnReason p_363852_, SpawnGroupData p_32262_) Drowned.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Illusioner.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) PatrollingMonster.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Phantom.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Pillager.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Shulker.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Slime.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Spider.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Strider.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Vex.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Vindicator.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) WitherSkeleton.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Zoglin.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Zombie.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) ZombieVillager.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.monster.hoglin
Methods in net.minecraft.world.entity.monster.hoglin with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanHoglin.checkHoglinSpawnRules(EntityType<Hoglin> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Hoglin.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.monster.piglin
Methods in net.minecraft.world.entity.monster.piglin with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanPiglin.checkPiglinSpawnRules(EntityType<Piglin> entityType, LevelAccessor level, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) Piglin.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) PiglinBrute.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.monster.warden
Methods in net.minecraft.world.entity.monster.warden with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionWarden.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.npc
Methods in net.minecraft.world.entity.npc with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionAbstractVillager.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) Villager.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.raid
Methods in net.minecraft.world.entity.raid with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionRaider.finalizeSpawn(ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnReason, SpawnGroupData spawnGroupData) -
Uses of EntitySpawnReason in net.minecraft.world.entity.vehicle
Methods in net.minecraft.world.entity.vehicle with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic <T extends AbstractMinecart>
TAbstractMinecart.createMinecart(Level level, double x, double y, double z, EntityType<T> type, EntitySpawnReason spawnReason, ItemStack spawnedFrom, Player player) -
Uses of EntitySpawnReason in net.neoforged.neoforge.event
Methods in net.neoforged.neoforge.event with parameters of type EntitySpawnReasonModifier and TypeMethodDescriptionstatic booleanEventHooks.checkSpawnPlacements(EntityType<?> entityType, ServerLevelAccessor level, EntitySpawnReason spawnType, BlockPos pos, RandomSource random, boolean defaultResult) static booleanEventHooks.checkSpawnPosition(Mob mob, ServerLevelAccessor level, EntitySpawnReason spawnType) Checks if the current position of the passed mob is valid for spawning, by firingMobSpawnEvent.PositionCheck.
The default check is to perform the logical and ofMob.checkSpawnRules(net.minecraft.world.level.LevelAccessor, net.minecraft.world.entity.EntitySpawnReason)andMob.checkSpawnObstruction(net.minecraft.world.level.LevelReader).static booleanEventHooks.checkSpawnPositionSpawner(Mob mob, ServerLevelAccessor level, EntitySpawnReason spawnType, SpawnData spawnData, BaseSpawner spawner) Specialized variant ofEventHooks.checkSpawnPosition(net.minecraft.world.entity.Mob, net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.entity.EntitySpawnReason)for spawners, as they have slightly different checks, and pass through theBaseSpawnerto the event.static @Nullable SpawnGroupDataEventHooks.finalizeMobSpawn(Mob mob, ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnType, @Nullable SpawnGroupData spawnData) Finalizes the spawn of a mob by firing theFinalizeSpawnEventand callingMob.finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.EntitySpawnReason, net.minecraft.world.entity.SpawnGroupData)with the result.static FinalizeSpawnEventEventHooks.finalizeMobSpawnSpawner(Mob mob, ServerLevelAccessor level, DifficultyInstance difficulty, EntitySpawnReason spawnType, @Nullable SpawnGroupData spawnData, IOwnedSpawner spawner, boolean def) Finalizes the spawn of a mob by firing theFinalizeSpawnEventand callingMob.finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.EntitySpawnReason, net.minecraft.world.entity.SpawnGroupData)with the result. -
Uses of EntitySpawnReason in net.neoforged.neoforge.event.entity.living
Fields in net.neoforged.neoforge.event.entity.living declared as EntitySpawnReasonModifier and TypeFieldDescriptionprivate final EntitySpawnReasonFinalizeSpawnEvent.spawnTypeprivate final EntitySpawnReasonMobSpawnEvent.PositionCheck.spawnTypeprivate final EntitySpawnReasonMobSpawnEvent.SpawnPlacementCheck.spawnTypeMethods in net.neoforged.neoforge.event.entity.living that return EntitySpawnReasonModifier and TypeMethodDescriptionFinalizeSpawnEvent.getSpawnType()Retrieves the type of mob spawn that happened (the event that caused the spawn).MobSpawnEvent.PositionCheck.getSpawnType()Retrieves the type of mob spawn that is happening.MobSpawnEvent.SpawnPlacementCheck.getSpawnType()Retrieves the type of mob spawn that is happening.Constructors in net.neoforged.neoforge.event.entity.living with parameters of type EntitySpawnReasonModifierConstructorDescriptionFinalizeSpawnEvent(Mob entity, ServerLevelAccessor level, double x, double y, double z, DifficultyInstance difficulty, EntitySpawnReason spawnType, @Nullable SpawnGroupData spawnData, @Nullable com.mojang.datafixers.util.Either<BlockEntity, Entity> spawner) PositionCheck(Mob mob, ServerLevelAccessor level, EntitySpawnReason spawnType, @Nullable BaseSpawner spawner) SpawnPlacementCheck(EntityType<?> entityType, ServerLevelAccessor level, EntitySpawnReason spawnType, BlockPos pos, RandomSource random, boolean defaultResult) Internal.