public class AttackEntityEvent extends PlayerEvent
EntityPlayer#attackTargetEntityWithCurrentItem(Entity)
.target
contains the Entity that was damaged by the player. Cancelable
.HasResult
MinecraftForge.EVENT_BUS
.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.ItemCraftedEvent, PlayerEvent.ItemPickupEvent, PlayerEvent.ItemSmeltedEvent, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.PlayerChangedDimensionEvent, PlayerEvent.PlayerLoggedInEvent, PlayerEvent.PlayerLoggedOutEvent, PlayerEvent.PlayerRespawnEvent, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Constructor and Description |
---|
AttackEntityEvent(PlayerEntity player,
Entity target) |
Modifier and Type | Method and Description |
---|---|
Entity |
getTarget() |
getPlayer
getEntityLiving
getEntity
private final Entity target
public AttackEntityEvent(PlayerEntity player, Entity target)
public Entity getTarget()