public static class ApricornEvent.PickApricorn extends ApricornEvent
ApricornEvent
subclass event which fires when an apricorn is being picked by a player.
Cancelling this event will stop the player from harvesting the apricorn
ApricornEvent.ApricornPlanted, ApricornEvent.ApricornReady, ApricornEvent.ApricornWatered, ApricornEvent.GrowthChance, ApricornEvent.PickApricorn
Modifier and Type | Field and Description |
---|---|
net.minecraft.entity.player.EntityPlayerMP |
player
The player picking the apricorn
|
TileEntityApricornTree |
tree
The tile entity representing the apricorn tree
|
apricorn, pos
Constructor and Description |
---|
PickApricorn(EnumApricorns apricorn,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.EntityPlayerMP player,
TileEntityApricornTree tree,
net.minecraft.item.ItemStack pickedStack) |
Modifier and Type | Method and Description |
---|---|
net.minecraft.item.ItemStack |
getPickedStack()
Gets the
ItemStack they will be given. |
void |
setPickedStack(net.minecraft.item.ItemStack pickedStack)
Sets the
ItemStack to be given to the player harvesting the tree. |
public final net.minecraft.entity.player.EntityPlayerMP player
public final TileEntityApricornTree tree
public PickApricorn(EnumApricorns apricorn, net.minecraft.util.math.BlockPos pos, net.minecraft.entity.player.EntityPlayerMP player, TileEntityApricornTree tree, net.minecraft.item.ItemStack pickedStack)
public net.minecraft.item.ItemStack getPickedStack()
ItemStack
they will be given. This can be modified safely by reference to change stack size, NBT, etc.public void setPickedStack(net.minecraft.item.ItemStack pickedStack)
ItemStack
to be given to the player harvesting the tree. This cannot be null