Class CustomPayloadEvent.Context

java.lang.Object
net.minecraftforge.event.network.CustomPayloadEvent.Context
Enclosing class:
CustomPayloadEvent

public static class CustomPayloadEvent.Context extends Object
Context for CustomPayloadEvent
  • Field Details

  • Constructor Details

  • Method Details

    • isClientSide

      public boolean isClientSide()
    • isServerSide

      public boolean isServerSide()
    • getDirection

      public NetworkDirection getDirection()
    • getConnection

      public Connection getConnection()
    • attr

      public <T> io.netty.util.Attribute<T> attr(io.netty.util.AttributeKey<T> key)
    • setPacketHandled

      public void setPacketHandled(boolean packetHandled)
    • getPacketHandled

      public boolean getPacketHandled()
    • enqueueWork

      public CompletableFuture<Void> enqueueWork(Runnable runnable)
    • getSender

      @Nullable public @Nullable ServerPlayer getSender()
      When available, gets the sender for packets that are sent from a client to the server.