Interface PacketContext


public interface PacketContext
Where a received payload came from.
  • Method Summary

    Modifier and Type
    Method
    Description
    The side that received the payload.
    net.minecraft.world.entity.player.Player
    The player it's about: the sender on the server, the local player on the client.
    void
    Runs a task on the receiving side's main thread.
  • Method Details

    • getPlayer

      net.minecraft.world.entity.player.Player getPlayer()
      The player it's about: the sender on the server, the local player on the client.
    • queue

      void queue(Runnable task)
      Runs a task on the receiving side's main thread.
    • getEnvironment

      Env getEnvironment()
      The side that received the payload.