Class BerryEvent.Pick
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.BerryEvent
com.pixelmonmod.pixelmon.api.events.BerryEvent.Pick
- Enclosing class:
- 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
-
Nested Class Summary
Nested classes/interfaces inherited from class com.pixelmonmod.pixelmon.api.events.BerryEvent
BerryEvent.Pick
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.item.ItemStack
Gets the itemstack being droppednet.minecraft.server.level.ServerPlayer
Gets the player picking the itemMethods inherited from class com.pixelmonmod.pixelmon.api.events.BerryEvent
getBerry, getLevel, getPos, getState
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
Pick
public Pick(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, BerryType berry, net.minecraft.core.BlockPos pos, net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack pickedStack)
-
-
Method Details
-
getPickedStack
public net.minecraft.world.item.ItemStack getPickedStack()Gets the itemstack being dropped- Returns:
- the dropped stack
-
getPlayer
public net.minecraft.server.level.ServerPlayer getPlayer()Gets the player picking the item- Returns:
-