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
public static class ZombieEvent.SummonAidEvent extends ZombieEvent
SummonAidEvent is fired when a Zombie Entity is summoned. This event is fired whenever a Zombie Entity is summoned inEntityZombie#attackEntityFrom(DamageSource, float). This event is fired via theForgeEventFactory#fireZombieSummonAid(EntityZombie, World, int, int, int, EntityLivingBase, double).customSummonedAidremains null, but can be populated with a custom EntityZombie which will be spawned.worldcontains the world that this summoning is occurring in.xcontains the x-coordinate at which this summoning event is occurring.ycontains the y-coordinate at which this summoning event is occurring.zcontains the z-coordinate at which this summoning event is occurring.attackercontains the living Entity that attacked and caused this event to fire.summonChancecontains the likelihood that a Zombie would successfully be summoned. This event is notCancelable. This event has a result.Event.HasResultEvent.Result.ALLOWZombie is summoned.Event.Result.DENYZombie is not summoned. This event is fired on theMinecraftForge.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
-
-
Field Summary
Fields Modifier and Type Field Description private LivingEntityattackerprivate ZombieEntitycustomSummonedAidprivate doublesummonChanceprivate Worldworldprivate intxprivate intyprivate intz
-
Constructor Summary
Constructors Constructor Description SummonAidEvent(ZombieEntity entity, World world, int x, int y, int z, LivingEntity attacker, double summonChance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LivingEntitygetAttacker()ZombieEntitygetCustomSummonedAid()Populate this field to have a custom zombie instead of a normal zombie summoneddoublegetSummonChance()WorldgetWorld()intgetX()intgetY()intgetZ()voidsetCustomSummonedAid(ZombieEntity customSummonedAid)-
Methods inherited from class net.minecraftforge.event.entity.living.ZombieEvent
getSummoner
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Field Detail
-
customSummonedAid
private ZombieEntity customSummonedAid
-
world
private final World world
-
x
private final int x
-
y
private final int y
-
z
private final int z
-
attacker
private final LivingEntity attacker
-
summonChance
private final double summonChance
-
-
Constructor Detail
-
SummonAidEvent
public SummonAidEvent(ZombieEntity entity, World world, int x, int y, int z, LivingEntity attacker, double summonChance)
-
-
Method Detail
-
getCustomSummonedAid
public ZombieEntity getCustomSummonedAid()
Populate this field to have a custom zombie instead of a normal zombie summoned
-
setCustomSummonedAid
public void setCustomSummonedAid(ZombieEntity customSummonedAid)
-
getWorld
public World getWorld()
-
getX
public int getX()
-
getY
public int getY()
-
getZ
public int getZ()
-
getAttacker
public LivingEntity getAttacker()
-
getSummonChance
public double getSummonChance()
-
-