GrindstoneOnPlaceItemEvent

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.GrindstoneOnPlaceItemEvent;

Extends

GrindstoneOnPlaceItemEvent extends GrindstoneEvent.

Listening to the event

This event can be listened to like so:

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

Members

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

Return Type: IItemStack

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

Return Type: bool

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

Return Type: bool

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

Return Type: bool

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

Parameters:

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

Return Type: bool

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

Parameters:

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

Return Type: bool

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

Return Type: bool

Getter
script.zs
// OnPlaceItem.output as IItemStack
event.output

Return Type: IItemStack

Setter
script.zs
// OnPlaceItem.output = (output as IItemStack);
event.output = myIItemStack;

Parameters:

output Type: IItemStack
Getter
script.zs
// OnPlaceItem.result as Result
event.result

Return Type: EventResult

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

Parameters:

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

Return Type: EventResult

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

Parameters:

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

Return Type: IItemStack

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

Return Type: int

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

Parameters:

xp Type: int