LivingEntityUseItemEvent

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.forge.api.event.entity.use.LivingEntityUseItemEvent;

Extends

LivingEntityUseItemEvent extends LivingEvent.

Members

cancel()
Cancels the event. Same as setCanceled(true)
script.zs
// LivingEntityUseItemEvent.cancel();
myLivingEntityUseItemEvent.cancel();
Getter
script.zs
// LivingEntityUseItemEvent.cancelable as bool
myLivingEntityUseItemEvent.cancelable

Return Type: bool

cancelable() as bool
script.zs
// LivingEntityUseItemEvent.cancelable() as bool;
myLivingEntityUseItemEvent.cancelable();

Return Type: bool

Getter
script.zs
// LivingEntityUseItemEvent.canceled as bool
myLivingEntityUseItemEvent.canceled

Return Type: bool

Setter
script.zs
// LivingEntityUseItemEvent.canceled = (cancel as bool);
myLivingEntityUseItemEvent.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// LivingEntityUseItemEvent.canceled() as bool;
myLivingEntityUseItemEvent.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// LivingEntityUseItemEvent.canceled(cancel as bool);
myLivingEntityUseItemEvent.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// LivingEntityUseItemEvent.duration as int
myLivingEntityUseItemEvent.duration

Return Type: int

Setter
script.zs
// LivingEntityUseItemEvent.duration = (duration as int);
myLivingEntityUseItemEvent.duration = myInt;

Parameters:

duration Type: int
Getter
script.zs
// LivingEntityUseItemEvent.entity as LivingEntity
myLivingEntityUseItemEvent.entity

Return Type: LivingEntity

Getter
script.zs
// LivingEntityUseItemEvent.entity as Entity
myLivingEntityUseItemEvent.entity

Return Type: Entity

Getter
script.zs
// LivingEntityUseItemEvent.hasResult as bool
myLivingEntityUseItemEvent.hasResult

Return Type: bool

hasResult() as bool
script.zs
// LivingEntityUseItemEvent.hasResult() as bool;
myLivingEntityUseItemEvent.hasResult();

Return Type: bool

Getter
script.zs
// LivingEntityUseItemEvent.item as IItemStack
myLivingEntityUseItemEvent.item

Return Type: IItemStack

Getter
script.zs
// LivingEntityUseItemEvent.result as Result
myLivingEntityUseItemEvent.result

Return Type: EventResult

Setter
script.zs
// LivingEntityUseItemEvent.result = (result as Result);
myLivingEntityUseItemEvent.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// LivingEntityUseItemEvent.result() as Result;
myLivingEntityUseItemEvent.result();

Return Type: EventResult

result(result as Result)
script.zs
// LivingEntityUseItemEvent.result(result as Result);
myLivingEntityUseItemEvent.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// LivingEntityUseItemEvent.setAllow();
myLivingEntityUseItemEvent.setAllow();
setDefault()
sets the event's result to default
script.zs
// LivingEntityUseItemEvent.setDefault();
myLivingEntityUseItemEvent.setDefault();
setDeny()
sets the event's result to deny
script.zs
// LivingEntityUseItemEvent.setDeny();
myLivingEntityUseItemEvent.setDeny();