Skip to content

Conditional sendPacket if Mod is installed on Remote #207

@BlayTheNinth

Description

@BlayTheNinth

Currently, mods advertised as server-only are not actually server-only because they try to send packets to the client and some or all loaders will close the connection on unexpected packets.

Affected mods include:

  • TrashSlot
  • Unbreakables

I think there may be a way to check for the existence of certain channels on the remote? But if not, we already have a packet for the version check that could be expanded for this.

Rough ideas:

Sending optional packets to clients

  • Expand use of ServerboundModListMessage to also be sent on Neo/Forge
  • some way for the server to lookup whether a given networked Balm mod is installed on the client
  • new trySendTo method for sending a packet to a client that only does so for clients with the given Balm mod installed

Sending optional packets to servers

  • Some way to specify whether a given Balm mod on the server should announce itself to the client
  • a ClientboundModListMessage that only holds the announced mods
  • some way for the client to lookup whether a given announced Balm mod is installed on the server
  • new trySendToServer method for sending a packet to a server only if it has announced support for this mod

Metadata

Metadata

Assignees

Labels

FeatureNew features or improvements to existing features

Projects

Status

🔥 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions