public static class BerryEvent.PickBerry extends BerryEvent
BerryEvent
subclass event which fires when an berry is being
picked by a player.
Cancelling this event will stop the player from harvesting the berry
BerryEvent.BerryPlanted, BerryEvent.BerryReady, BerryEvent.BerryWatered, BerryEvent.PickBerry
Modifier and Type | Field and Description |
---|---|
net.minecraft.entity.player.EntityPlayerMP |
player
The player picking the berry
|
TileEntityBerryTree |
tree
The tile entity representing the berry tree
|
berry, pos
Constructor and Description |
---|
PickBerry(EnumBerry berry,
net.minecraft.util.math.BlockPos pos,
net.minecraft.entity.player.EntityPlayerMP player,
TileEntityBerryTree 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 TileEntityBerryTree tree
public PickBerry(EnumBerry berry, net.minecraft.util.math.BlockPos pos, net.minecraft.entity.player.EntityPlayerMP player, TileEntityBerryTree 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