Class NetworkState.PacketHandler<T extends PacketListener>

java.lang.Object
net.minecraft.network.NetworkState.PacketHandler<T>
Enclosing class:
NetworkState

private static class NetworkState.PacketHandler<T extends PacketListener> extends Object
Mappings:
Namespace Name
official of$a
intermediary net/minecraft/class_2539$class_4532
named net/minecraft/network/NetworkState$PacketHandler
  • Field Details

    • packetIds

      private final Object2IntMap<Class<? extends Packet<T extends PacketListener>>> packetIds
      Mappings:
      Namespace Name Mixin selector
      official a Lof$a;a:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      intermediary field_20596 Lnet/minecraft/class_2539$class_4532;field_20596:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      named packetIds Lnet/minecraft/network/NetworkState$PacketHandler;packetIds:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
    • packetFactories

      private final List<Function<PacketByteBuf,​? extends Packet<T extends PacketListener>>> packetFactories
      Mappings:
      Namespace Name Mixin selector
      official b Lof$a;b:Ljava/util/List;
      intermediary field_20597 Lnet/minecraft/class_2539$class_4532;field_20597:Ljava/util/List;
      named packetFactories Lnet/minecraft/network/NetworkState$PacketHandler;packetFactories:Ljava/util/List;
  • Constructor Details

    • PacketHandler

      PacketHandler()
  • Method Details

    • register

      public <P extends Packet<T>> NetworkState.PacketHandler<T> register(Class<P> type, Function<PacketByteBuf,​P> function)
      Mappings:
      Namespace Name Mixin selector
      official a Lof$a;a(Ljava/lang/Class;Ljava/util/function/Function;)Lof$a;
      intermediary method_22313 Lnet/minecraft/class_2539$class_4532;method_22313(Ljava/lang/Class;Ljava/util/function/Function;)Lnet/minecraft/class_2539$class_4532;
      named register Lnet/minecraft/network/NetworkState$PacketHandler;register(Ljava/lang/Class;Ljava/util/function/Function;)Lnet/minecraft/network/NetworkState$PacketHandler;
    • getId

      @Nullable public @Nullable Integer getId(Class<?> packet)
      Mappings:
      Namespace Name Mixin selector
      official a Lof$a;a(Ljava/lang/Class;)Ljava/lang/Integer;
      intermediary method_22312 Lnet/minecraft/class_2539$class_4532;method_22312(Ljava/lang/Class;)Ljava/lang/Integer;
      named getId Lnet/minecraft/network/NetworkState$PacketHandler;getId(Ljava/lang/Class;)Ljava/lang/Integer;
    • createPacket

      @Nullable public @Nullable Packet<?> createPacket(int id, PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Lof$a;a(ILog;)Lpk;
      intermediary method_22310 Lnet/minecraft/class_2539$class_4532;method_22310(ILnet/minecraft/class_2540;)Lnet/minecraft/class_2596;
      named createPacket Lnet/minecraft/network/NetworkState$PacketHandler;createPacket(ILnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/network/Packet;
    • getPacketTypes

      public Iterable<Class<? extends Packet<?>>> getPacketTypes()
      Mappings:
      Namespace Name Mixin selector
      official a Lof$a;a()Ljava/lang/Iterable;
      intermediary method_22309 Lnet/minecraft/class_2539$class_4532;method_22309()Ljava/lang/Iterable;
      named getPacketTypes Lnet/minecraft/network/NetworkState$PacketHandler;getPacketTypes()Ljava/lang/Iterable;