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.entity.player . PlayerHarvestCheckEvent;
PlayerHarvestCheckEvent extends PlayerEvent
.
This event can be listened to like so:
events . register < crafttweaker . neoforge.api.event.entity.player . PlayerHarvestCheckEvent > ( event = > {
println ( "PlayerHarvestCheckEvent ran!" ) ;
// HarvestCheck.canHarvest as bool
Return Type:
bool
// HarvestCheck.canHarvest = (success as bool);
event . canHarvest = myBool;
// HarvestCheck.entity as Player
Return Type:
Player
// HarvestCheck.entity as LivingEntity
Return Type:
LivingEntity
// HarvestCheck.entity as Entity
Return Type:
Entity
// HarvestCheck.targetBlock as BlockState
Return Type:
BlockState