Skip to content
This repository was archived by the owner on Aug 15, 2022. It is now read-only.
This repository was archived by the owner on Aug 15, 2022. It is now read-only.

Consider adding relevant network object to RpcArgs #398

Description

@NoTuxNoBux

Version Number and Operating System(s):

Windows 10, Forge Network Alloy at da8e129 (develop).

Expected behavior:

Easy way to access relevant network object RPC was invoked on from RpcArgs (or RpcArgs.RPCInfo).

This is a fairly minor thing, since RPC handlers exist in the network object to begin with, grabbing networkObject inside the behavior object is fairly easy to do to work around this. The reason I'm asking is because during refactoring one may create different classes to handle specific RPCs, which then need to be passed not only the RpcArgs, but also the relevant NetworkObject. This results in a so-called data clump.

Actual behavior:

No way to easily access relevant network object RPC was invoked on from RpcArgs.

Steps to reproduce:

Create an RPC and a handler for it and observe that you cannot directly access the relevant network object from it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions