public class TurtleAttackEvent extends TurtlePlayerEvent
ITurtleUpgrade.useTool(ITurtleAccess, TurtleSide, TurtleVerb, EnumFacing),
as the base turtle.attack() command does not fire it.
Note that such commands should also fire AttackEntityEvent, so you do not need to listen to both.TurtleAction.ATTACK| Constructor and Description |
|---|
TurtleAttackEvent(ITurtleAccess turtle,
net.minecraftforge.common.util.FakePlayer player,
net.minecraft.entity.Entity target,
ITurtleUpgrade upgrade,
TurtleSide side) |
| Modifier and Type | Method and Description |
|---|---|
TurtleSide |
getSide()
Get the side the attacking upgrade is on.
|
net.minecraft.entity.Entity |
getTarget()
Get the entity being attacked by this turtle.
|
ITurtleUpgrade |
getUpgrade()
Get the upgrade responsible for attacking.
|
getPlayergetAction, getFailureMessage, setCanceled, setCanceledgetTurtlepublic TurtleAttackEvent(@Nonnull
ITurtleAccess turtle,
@Nonnull
net.minecraftforge.common.util.FakePlayer player,
@Nonnull
net.minecraft.entity.Entity target,
@Nonnull
ITurtleUpgrade upgrade,
@Nonnull
TurtleSide side)
@Nonnull public net.minecraft.entity.Entity getTarget()
@Nonnull public ITurtleUpgrade getUpgrade()
@Nonnull public TurtleSide getSide()