类 SpawnClusterSizeEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.living.LivingEvent
net.neoforged.neoforge.event.entity.living.SpawnClusterSizeEvent
This event is fired from
NaturalSpawner.spawnCategoryForPosition(net.minecraft.world.entity.MobCategory, net.minecraft.server.level.ServerLevel, net.minecraft.core.BlockPos)
when the spawning
system determines the maximum amount of the selected entity that can spawn at the same time.-
嵌套类概要
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingVisibilityEvent
从类继承的嵌套类/接口 net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
-
字段详细资料
-
size
private int size
-
-
构造器详细资料
-
SpawnClusterSizeEvent
-
-
方法详细资料
-
getSize
public int getSize()Gets the possibly event-modified max spawn cluster size for the entity.To see the default size, use
Mob.getMaxSpawnClusterSize()
- 返回:
- The max spawn cluster size
-
setSize
public void setSize(int size) Changes the max cluster size for the entity.- 参数:
size
- The new size
-
getEntity
- 覆盖:
getEntity
在类中LivingEvent
-