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.
import crafttweaker.neoforge.api.event.grindstone.GrindstoneOnPlaceItemEvent;
Extends
GrindstoneOnPlaceItemEvent extends GrindstoneEvent
.
Implements
GrindstoneOnPlaceItemEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
events.register<crafttweaker.neoforge.api.event.grindstone.GrindstoneOnPlaceItemEvent>(event => { println("GrindstoneOnPlaceItemEvent ran!");});
Members
Getter
// OnPlaceItem.bottomItem as IItemStackevent.bottomItem
Return Type:
IItemStack
cancel()
Cancels the event. Same as script.zs
setCanceled(true)
// OnPlaceItem.cancel();event.cancel();
Getter
// OnPlaceItem.canceled as boolevent.canceled
Return Type:
bool
Setter
// OnPlaceItem.canceled = (cancel as bool);event.canceled = myBool;
Parameters:
cancel: bool
Type: bool
canceled() as bool
// OnPlaceItem.canceled() as bool;event.canceled();
Return Type:
bool
canceled(cancel as bool)
// OnPlaceItem.canceled(cancel as bool);event.canceled(myBool);
Parameters:
cancel: bool
Type: bool
Getter
// OnPlaceItem.output as IItemStackevent.output
Return Type:
IItemStack
Setter
event.output = myIItemStack;
Parameters:
output: IItemStack
Type: IItemStack
Getter
// OnPlaceItem.topItem as IItemStackevent.topItem
Return Type:
IItemStack
Getter
// OnPlaceItem.xp as intevent.xp
Return Type:
int
Setter
// OnPlaceItem.xp = (xp as int);event.xp = myInt;
Parameters:
xp: int
Type: int