Interface GameEventBlock


public interface GameEventBlock
A BlockEntity used with BlockBE can implement this. Then a GameEventListener to listen to game events will be created.
  • Method Summary

    Modifier and Type
    Method
    Description
    default net.minecraft.world.level.gameevent.GameEventListener.DeliveryMode
    Gets the delivery mode for this game event listener.
    default int
    Gets the range in which game events should be detected.
    boolean
    notifyGameEvent(net.minecraft.server.level.ServerLevel level, net.minecraft.world.level.gameevent.GameEvent message, net.minecraft.world.level.gameevent.GameEvent.Context context, net.minecraft.world.phys.Vec3 pos)
    Notifies the block entity of game event.
  • Method Details

    • gameEventRange

      default int gameEventRange()
      Gets the range in which game events should be detected. Defaults to 8.
    • notifyGameEvent

      boolean notifyGameEvent(net.minecraft.server.level.ServerLevel level, net.minecraft.world.level.gameevent.GameEvent message, net.minecraft.world.level.gameevent.GameEvent.Context context, net.minecraft.world.phys.Vec3 pos)
      Notifies the block entity of game event.
      Returns:
      true to indicate the event was handled, false otherwise.
    • gameEventDelivery

      default net.minecraft.world.level.gameevent.GameEventListener.DeliveryMode gameEventDelivery()
      Gets the delivery mode for this game event listener.