Class PacketProcessor

java.lang.Object
net.minecraft.network.PacketProcessor
All Implemented Interfaces:
AutoCloseable

public class PacketProcessor extends Object implements AutoCloseable
  • Field Details

    • LOGGER

      static final org.slf4j.Logger LOGGER
    • packetsToBeHandled

      private final Queue<QueuedPacket> packetsToBeHandled
    • runningThread

      private final Thread runningThread
    • closed

      private boolean closed
  • Constructor Details

    • PacketProcessor

      public PacketProcessor(Thread pRunningThread)
  • Method Details

    • isSameThread

      public boolean isSameThread()
    • scheduleIfPossible

      public <T extends PacketListener> void scheduleIfPossible(T pListener, Packet<T> pPacket)
    • scheduleIfPossible

      @Internal public void scheduleIfPossible(Runnable task)
      Neo: Enqueue a main thread task from a custom payload packet handler. Use via IPayloadContext.enqueueWork(java.lang.Runnable)
    • processQueuedPackets

      public void processQueuedPackets()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable