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

    Nested Classes
    Modifier and Type
    Class
    Description
    static 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

    Constructors
    Modifier
    Constructor
    Description
    protected
    BerryEvent(net.minecraft.world.level.Level level, net.minecraft.world.level.block.state.BlockState state, BerryType berry, net.minecraft.core.BlockPos pos)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the berry type
    net.minecraft.world.level.Level
    Gets the world they're in
    net.minecraft.core.BlockPos
    Gets the block position
    net.minecraft.world.level.block.state.BlockState
    The state being modified

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public BerryType getBerry()
      Gets the berry type
      Returns:
      The berry type
    • getPos

      public net.minecraft.core.BlockPos getPos()
      Gets the block position
      Returns:
      block position