Class BerryEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.BerryEvent
- Direct Known Subclasses:
BerryEvent.Pick
public abstract class BerryEvent
extends net.minecraftforge.eventbus.api.Event
Superclass event for all berry related actions. Subclasses:
BerryEvent.Pick
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
BerryEvent
subclass event which fires when an berry is being picked by a player.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
ModifierConstructorDescriptionprotected
BerryEvent
(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, BerryType berry, net.minecraft.core.BlockPos pos) -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Constructor Details
-
BerryEvent
protected BerryEvent(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, BerryType berry, net.minecraft.core.BlockPos pos)
-
-
Method Details
-
getLevel
public net.minecraft.world.level.Level getLevel()Gets the world they're in- Returns:
- The world
-
getState
public net.minecraft.world.level.block.state.BlockState getState()The state being modified- Returns:
- The state
-
getBerry
Gets the berry type- Returns:
- The berry type
-
getPos
public net.minecraft.core.BlockPos getPos()Gets the block position- Returns:
- block position
-