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.neoforge.api.event.grindstone.GrindstoneOnPlaceItemEvent;

Extends

GrindstoneOnPlaceItemEvent extends GrindstoneEvent.

Implements

GrindstoneOnPlaceItemEvent implements the following interfaces:

ICancellableEvent

Listening to the event

This event can be listened to like so:

script.zs
events.register<crafttweaker.neoforge.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.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.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.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