GrindstoneOnTakeItemEvent

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.grindstone.GrindstoneOnTakeItemEvent;

Extends

GrindstoneOnTakeItemEvent extends GrindstoneEvent.

Listening to the event

This event can be listened to like so:

script.zs
events.register<crafttweaker.forge.api.event.grindstone.GrindstoneOnTakeItemEvent>(event => {
println("GrindstoneOnTakeItemEvent ran!");
});

Members

Getter
script.zs
// OnTakeItem.bottomItem as IItemStack
event.bottomItem

Return Type: IItemStack

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

Return Type: bool

cancelable() as bool
script.zs
// OnTakeItem.cancelable() as bool;
event.cancelable();

Return Type: bool

Getter
script.zs
// OnTakeItem.canceled as bool
event.canceled

Return Type: bool

Setter
script.zs
// OnTakeItem.canceled = (cancel as bool);
event.canceled = myBool;

Parameters:

cancel Type: bool
canceled() as bool
script.zs
// OnTakeItem.canceled() as bool;
event.canceled();

Return Type: bool

canceled(cancel as bool)
script.zs
// OnTakeItem.canceled(cancel as bool);
event.canceled(myBool);

Parameters:

cancel Type: bool
Getter
script.zs
// OnTakeItem.hasResult as bool
event.hasResult

Return Type: bool

hasResult() as bool
script.zs
// OnTakeItem.hasResult() as bool;
event.hasResult();

Return Type: bool

Getter
script.zs
// OnTakeItem.newBottomItem as IItemStack
event.newBottomItem

Return Type: IItemStack

Setter
script.zs
// OnTakeItem.newBottomItem = (newBottom as IItemStack);
event.newBottomItem = myIItemStack;

Parameters:

newBottom Type: IItemStack
Getter
script.zs
// OnTakeItem.newTopItem as IItemStack
event.newTopItem

Return Type: IItemStack

Setter
script.zs
// OnTakeItem.newTopItem = (newTop as IItemStack);
event.newTopItem = myIItemStack;

Parameters:

newTop Type: IItemStack
Getter
script.zs
// OnTakeItem.result as Result
event.result

Return Type: EventResult

Setter
script.zs
// OnTakeItem.result = (result as Result);
event.result = myResult;

Parameters:

result Type: EventResult
result() as Result
script.zs
// OnTakeItem.result() as Result;
event.result();

Return Type: EventResult

result(result as Result)
script.zs
// OnTakeItem.result(result as Result);
event.result(myResult);

Parameters:

result Type: EventResult
setAllow()
sets the event's result to allow
script.zs
// OnTakeItem.setAllow();
event.setAllow();
setDefault()
sets the event's result to default
script.zs
// OnTakeItem.setDefault();
event.setDefault();
setDeny()
sets the event's result to deny
script.zs
// OnTakeItem.setDeny();
event.setDeny();
Getter
script.zs
// OnTakeItem.topItem as IItemStack
event.topItem

Return Type: IItemStack

Getter
script.zs
// OnTakeItem.xp as int
event.xp

Return Type: int

Setter
script.zs
// OnTakeItem.xp = (xp as int);
event.xp = myInt;

Parameters:

xp Type: int