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 p_21686_, EntitySpawnReason p_361803_) 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(CompoundTag tag, Level level, EntitySpawnReason spawnReason) EntityType.create(ServerLevel level, Consumer<T> consumer, BlockPos pos, EntitySpawnReason reason, boolean shoulOffsetY, boolean shouldOffsetYMore) EntityType.create(Level level, EntitySpawnReason spawnReason) AgeableMob.finalizeSpawn(ServerLevelAccessor p_146746_, DifficultyInstance p_146747_, EntitySpawnReason p_363316_, SpawnGroupData p_146749_) 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(List<? extends Tag> entityTags, Level level, EntitySpawnReason spawnReason) static EntityEntityType.loadEntityRecursive(CompoundTag entityTag, Level level, EntitySpawnReason spawnReason, Function<Entity, Entity> adapter) EntityType.loadStaticEntity(CompoundTag entityTag, 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 p_27528_, DifficultyInstance p_27529_, EntitySpawnReason p_360900_, SpawnGroupData p_27531_) Cat.finalizeSpawn(ServerLevelAccessor p_28134_, DifficultyInstance p_28135_, EntitySpawnReason p_362361_, SpawnGroupData p_28137_) Chicken.finalizeSpawn(ServerLevelAccessor p_401793_, DifficultyInstance p_401843_, EntitySpawnReason p_401765_, SpawnGroupData p_401920_) Cow.finalizeSpawn(ServerLevelAccessor p_401024_, DifficultyInstance p_401230_, EntitySpawnReason p_401413_, SpawnGroupData p_401109_) Dolphin.finalizeSpawn(ServerLevelAccessor p_28332_, DifficultyInstance p_28333_, EntitySpawnReason p_364784_, SpawnGroupData p_28335_) Fox.finalizeSpawn(ServerLevelAccessor p_28487_, DifficultyInstance p_28488_, EntitySpawnReason p_363726_, SpawnGroupData p_28490_) Ocelot.finalizeSpawn(ServerLevelAccessor p_29007_, DifficultyInstance p_29008_, EntitySpawnReason p_362657_, SpawnGroupData p_29010_) Panda.finalizeSpawn(ServerLevelAccessor p_29109_, DifficultyInstance p_29110_, EntitySpawnReason p_365266_, SpawnGroupData p_29112_) Parrot.finalizeSpawn(ServerLevelAccessor p_29389_, DifficultyInstance p_29390_, EntitySpawnReason p_365194_, SpawnGroupData p_29392_) Pig.finalizeSpawn(ServerLevelAccessor p_394599_, DifficultyInstance p_393951_, EntitySpawnReason p_393505_, SpawnGroupData p_394079_) PolarBear.finalizeSpawn(ServerLevelAccessor p_29533_, DifficultyInstance p_29534_, EntitySpawnReason p_361358_, SpawnGroupData p_29536_) Rabbit.finalizeSpawn(ServerLevelAccessor p_29678_, DifficultyInstance p_29679_, EntitySpawnReason p_362286_, SpawnGroupData p_29681_) Salmon.finalizeSpawn(ServerLevelAccessor p_360331_, DifficultyInstance p_360341_, EntitySpawnReason p_362539_, SpawnGroupData p_361173_) Squid.finalizeSpawn(ServerLevelAccessor p_363110_, DifficultyInstance p_360622_, EntitySpawnReason p_360451_, SpawnGroupData p_364007_) TropicalFish.finalizeSpawn(ServerLevelAccessor p_30023_, DifficultyInstance p_30024_, EntitySpawnReason p_362528_, SpawnGroupData p_30026_) Turtle.finalizeSpawn(ServerLevelAccessor p_30153_, DifficultyInstance p_30154_, EntitySpawnReason p_361581_, SpawnGroupData p_30156_) -
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 p_149132_, DifficultyInstance p_149133_, EntitySpawnReason p_361790_, SpawnGroupData p_149135_) -
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 p_249190_, DifficultyInstance p_251264_, EntitySpawnReason p_364651_, SpawnGroupData p_249259_) -
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 p_218488_, DifficultyInstance p_218489_, EntitySpawnReason p_361013_, SpawnGroupData p_218491_) -
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 p_149365_, DifficultyInstance p_149366_, EntitySpawnReason p_360901_, SpawnGroupData p_149368_) -
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 p_30555_, DifficultyInstance p_30556_, EntitySpawnReason p_363523_, SpawnGroupData p_30558_) Horse.finalizeSpawn(ServerLevelAccessor p_30703_, DifficultyInstance p_30704_, EntitySpawnReason p_364884_, SpawnGroupData p_30706_) Llama.finalizeSpawn(ServerLevelAccessor p_30774_, DifficultyInstance p_30775_, EntitySpawnReason p_364775_, SpawnGroupData p_30777_) TraderLlama.finalizeSpawn(ServerLevelAccessor p_30942_, DifficultyInstance p_30943_, EntitySpawnReason p_364324_, SpawnGroupData p_30945_) -
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 p_404937_, DifficultyInstance p_405503_, EntitySpawnReason p_405554_, SpawnGroupData p_405662_) -
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 p_406251_, DifficultyInstance p_406357_, EntitySpawnReason p_406333_, SpawnGroupData p_406273_) -
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 p_32146_, DifficultyInstance p_32147_, EntitySpawnReason p_362962_, SpawnGroupData p_32149_) CaveSpider.finalizeSpawn(ServerLevelAccessor p_32259_, DifficultyInstance p_32260_, EntitySpawnReason p_363852_, SpawnGroupData p_32262_) Drowned.finalizeSpawn(ServerLevelAccessor p_32372_, DifficultyInstance p_32373_, EntitySpawnReason p_365099_, SpawnGroupData p_32375_) Illusioner.finalizeSpawn(ServerLevelAccessor p_32921_, DifficultyInstance p_32922_, EntitySpawnReason p_365326_, SpawnGroupData p_32924_) PatrollingMonster.finalizeSpawn(ServerLevelAccessor p_33049_, DifficultyInstance p_33050_, EntitySpawnReason p_364305_, SpawnGroupData p_33052_) Phantom.finalizeSpawn(ServerLevelAccessor p_33126_, DifficultyInstance p_33127_, EntitySpawnReason p_364084_, SpawnGroupData p_33129_) Pillager.finalizeSpawn(ServerLevelAccessor p_33282_, DifficultyInstance p_33283_, EntitySpawnReason p_363547_, SpawnGroupData p_33285_) Shulker.finalizeSpawn(ServerLevelAccessor p_149780_, DifficultyInstance p_149781_, EntitySpawnReason p_363202_, SpawnGroupData p_149783_) Slime.finalizeSpawn(ServerLevelAccessor p_33601_, DifficultyInstance p_33602_, EntitySpawnReason p_361992_, SpawnGroupData p_33604_) Spider.finalizeSpawn(ServerLevelAccessor p_33790_, DifficultyInstance p_33791_, EntitySpawnReason p_362727_, SpawnGroupData p_33793_) Strider.finalizeSpawn(ServerLevelAccessor p_33887_, DifficultyInstance p_33888_, EntitySpawnReason p_360626_, SpawnGroupData p_33890_) Vex.finalizeSpawn(ServerLevelAccessor p_34002_, DifficultyInstance p_34003_, EntitySpawnReason p_364407_, SpawnGroupData p_34005_) Vindicator.finalizeSpawn(ServerLevelAccessor p_34088_, DifficultyInstance p_34089_, EntitySpawnReason p_362629_, SpawnGroupData p_34091_) WitherSkeleton.finalizeSpawn(ServerLevelAccessor p_34178_, DifficultyInstance p_34179_, EntitySpawnReason p_364674_, SpawnGroupData p_34181_) Zoglin.finalizeSpawn(ServerLevelAccessor p_362960_, DifficultyInstance p_365250_, EntitySpawnReason p_363042_, SpawnGroupData p_360432_) Zombie.finalizeSpawn(ServerLevelAccessor p_34297_, DifficultyInstance p_34298_, EntitySpawnReason p_362602_, SpawnGroupData p_34300_) ZombieVillager.finalizeSpawn(ServerLevelAccessor p_34378_, DifficultyInstance p_34379_, EntitySpawnReason p_362634_, SpawnGroupData p_34381_) -
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 p_34508_, DifficultyInstance p_34509_, EntitySpawnReason p_364113_, SpawnGroupData p_34511_) -
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 p_34717_, DifficultyInstance p_34718_, EntitySpawnReason p_361787_, SpawnGroupData p_34720_) PiglinBrute.finalizeSpawn(ServerLevelAccessor p_35058_, DifficultyInstance p_35059_, EntitySpawnReason p_364915_, SpawnGroupData p_35061_) -
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 p_219400_, DifficultyInstance p_219401_, EntitySpawnReason p_360351_, SpawnGroupData p_219403_) -
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 p_35282_, DifficultyInstance p_35283_, EntitySpawnReason p_361694_, SpawnGroupData p_35285_) Villager.finalizeSpawn(ServerLevelAccessor p_35439_, DifficultyInstance p_35440_, EntitySpawnReason p_363222_, SpawnGroupData p_35442_) -
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 p_37856_, DifficultyInstance p_37857_, EntitySpawnReason p_362502_, SpawnGroupData p_37859_) -
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.