Class ZombieEvent.SummonAidEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.ZombieEvent
net.minecraftforge.event.entity.living.ZombieEvent.SummonAidEvent
- Enclosing class:
- ZombieEvent
SummonAidEvent is fired when a Zombie Entity is summoned.
This event is fired whenever a Zombie Entity is summoned in
EntityZombie#attackEntityFrom(DamageSource, float)
.
This event is fired via the ForgeEventFactory.fireZombieSummonAid(EntityZombie, World, int, int, int, EntityLivingBase, double)
.
customSummonedAid
remains null, but can be populated with a custom EntityZombie which will be spawned.
world
contains the world that this summoning is occurring in.
x
contains the x-coordinate at which this summoning event is occurring.
y
contains the y-coordinate at which this summoning event is occurring.
z
contains the z-coordinate at which this summoning event is occurring.
attacker
contains the living Entity that attacked and caused this event to fire.
summonChance
contains the likelihood that a Zombie would successfully be summoned.
This event is not Cancelable
.
This event has a result. Event.HasResult
Event.Result.ALLOW
Zombie is summoned.
Event.Result.DENY
Zombie is not summoned.
This event is fired on the MinecraftForge.EVENT_BUS
.-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.living.ZombieEvent
ZombieEvent.SummonAidEvent
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, 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
Modifier and TypeFieldDescriptionprivate final LivingEntity
private ZombieEntity
private final double
private final World
private final int
private final int
private final int
-
Constructor Summary
ConstructorDescriptionSummonAidEvent
(ZombieEntity entity, World world, int x, int y, int z, LivingEntity attacker, double summonChance) -
Method Summary
Modifier and TypeMethodDescriptionPopulate this field to have a custom zombie instead of a normal zombie summoneddouble
getWorld()
int
getX()
int
getY()
int
getZ()
void
setCustomSummonedAid
(ZombieEntity customSummonedAid) Methods inherited from class net.minecraftforge.event.entity.living.ZombieEvent
getSummoner
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
-
customSummonedAid
-
world
-
x
private final int x -
y
private final int y -
z
private final int z -
attacker
-
summonChance
private final double summonChance
-
-
Constructor Details
-
SummonAidEvent
public SummonAidEvent(ZombieEntity entity, World world, int x, int y, int z, LivingEntity attacker, double summonChance)
-
-
Method Details
-
getCustomSummonedAid
Populate this field to have a custom zombie instead of a normal zombie summoned -
setCustomSummonedAid
-
getWorld
-
getX
public int getX() -
getY
public int getY() -
getZ
public int getZ() -
getAttacker
-
getSummonChance
public double getSummonChance()
-