IDDDEvent - yeelp/Distinct-Damage-Descriptions GitHub Wiki

This event is extended by almost all of DDD's events.

Importing the class

It might be required to import the class to avoid errors.

import mods.ddd.events.DDDEvent;

Extending IEntityEvent

This event extends CraftTweaker's IEntityEvent. So anything accessible from that event is accessible from IDDDEvent.

What can you do with this?

ZenGetters

ZenGetter Return Type Notes
defender IEntityLivingBase Gets the defending entity; the entity that was attacked.
attacker IEntity Gets the attacking entity; this is the same IEntity as IEntityEvent's entity ZenGetter.
trueAttacker IEntity Gets the true entity that made the attack. "The Shulker, not the bullet", or "The Skeleton, not the arrow".
originalSource IDamageSource Gets the original damage source of this attack.
cancelable boolean This will be true for events that can be canceled, and false otherwise.

ZenMethods

void setCanceled(boolean);

  • Sets the canceled status of the event. Further event handlers will not be processed if the event is canceled, and some events have specific behaviour when canceled.
  • If the event can not be canceled (i.e. the cancelable ZenGetter is false), calling this ZenMethod will throw an exception.