Class LivingPackSizeEvent
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.LivingPackSizeEvent
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.SizeNested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis event is fired when the spawning system determines the maximum amount of the selected entity that can spawn at the same time.voidsetMaxPackSize(int maxPackSize) Methods inherited from class net.neoforged.neoforge.event.entity.living.LivingEvent
getEntityMethods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
-
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)
-