Class LivingPackSizeEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingPackSizeEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent, LivingEvent.LivingVisibilityEvent
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
This event is fired when the spawning system determines the maximum amount of the selected entity that can spawn at the same time.void
setMaxPackSize(int maxPackSize)
Methods inherited from class net.minecraftforge.event.entity.living.LivingEvent
getEntityLiving
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
maxPackSize
private int maxPackSize
-
-
Constructor Details
-
LivingPackSizeEvent
-
-
Method Details
-
getMaxPackSize
public int getMaxPackSize()This event is fired when the spawning system determines the maximum amount of the selected entity that can spawn at the same time. If you set the result to 'ALLOW', it means that you want to return the value of maxPackSize as the maximum pack size for current entity. -
setMaxPackSize
public void setMaxPackSize(int maxPackSize)
-