Class PacketDistributor<T>

    • Constructor Detail

      • PacketDistributor

        public PacketDistributor​(java.util.function.BiFunction<PacketDistributor<T>,​java.util.function.Supplier<T>,​java.util.function.Consumer<IPacket<?>>> functor,
                                 NetworkDirection direction)
    • Method Detail

      • with

        public PacketDistributor.PacketTarget with​(java.util.function.Supplier<T> input)
        Apply the supplied value to the specific distributor to generate an instance for sending packets to.
        Parameters:
        input - The input to apply
        Returns:
        A curried instance
      • noArg

        public PacketDistributor.PacketTarget noArg()
        Apply a no argument value to a distributor to generate an instance for sending packets to.
        Returns:
        A curried instance
        See Also:
        ALL, SERVER
      • playerConsumer

        private java.util.function.Consumer<IPacket<?>> playerConsumer​(java.util.function.Supplier<ServerPlayerEntity> entityPlayerMPSupplier)
      • playerListDimConsumer

        private java.util.function.Consumer<IPacket<?>> playerListDimConsumer​(java.util.function.Supplier<RegistryKey<World>> dimensionTypeSupplier)
      • playerListAll

        private java.util.function.Consumer<IPacket<?>> playerListAll​(java.util.function.Supplier<java.lang.Void> voidSupplier)
      • clientToServer

        private java.util.function.Consumer<IPacket<?>> clientToServer​(java.util.function.Supplier<java.lang.Void> voidSupplier)
      • playerListPointConsumer

        private java.util.function.Consumer<IPacket<?>> playerListPointConsumer​(java.util.function.Supplier<PacketDistributor.TargetPoint> targetPointSupplier)
      • trackingEntity

        private java.util.function.Consumer<IPacket<?>> trackingEntity​(java.util.function.Supplier<Entity> entitySupplier)
      • trackingEntityAndSelf

        private java.util.function.Consumer<IPacket<?>> trackingEntityAndSelf​(java.util.function.Supplier<Entity> entitySupplier)
      • trackingChunk

        private java.util.function.Consumer<IPacket<?>> trackingChunk​(java.util.function.Supplier<Chunk> chunkPosSupplier)
      • networkManagerList

        private java.util.function.Consumer<IPacket<?>> networkManagerList​(java.util.function.Supplier<java.util.List<NetworkManager>> nmListSupplier)