ItemEntityPickupPreEvent

Link to itementitypickuppreevent

Importing the class

Link to importing-the-class

Importing the class is recommended for events, simply add this line to the top of your script file.

ZenScript
Copy
import crafttweaker.neoforge.api.event.item.ItemEntityPickupPreEvent;

Listening to the event

Link to listening-to-the-event

ZenScript
Copy
events.register<crafttweaker.neoforge.api.event.item.ItemEntityPickupPreEvent>(event => {
    println("ItemEntityPickupPreEvent ran!");
});

ItemEntityPickupPreEvent extends ItemEntityPickupEvent. That means all methods available in ItemEntityPickupEvent are also available in ItemEntityPickupPreEvent

NameTypeHas GetterHas Setter
Name
canPickup
Type
TriState
Has Getter
true
Has Setter
true