Investigate bridging Fabric Message API with Quilt Chat API
EnnuiL opened this issue ยท 5 comments
While both appears to be besties so far? I do believe it's possible for one to be bridged to the another, since the latter appears to be a weird subset of the former
Fabric message events (CHAT_MESSAGE
, GAME_MESSAGE
and COMMAND_MESSAGE
) are not analogous to the Quilt chat message types (CHAT
, SYSTEM
, PROFILE_INDEPENDENT
). While some similarity exists, the differences are huge. For example, Quilt's CHAT
is invoked on both normal chat messages and commands like /me
while Fabric's CHAT_MESSAGE
is invoked on player-sent chat messages and /msg
, but for /me
and /say
COMMAND_MESSAGE
is used instead. Also Fabric Message API seems to be server-side only while Quilt invokes the events on client too and even provides functionality (SERVER
and CLIENT
event types) to distinguish them.
Because of that, converting Fabric message events to Quilt ones might be tedious and hard to maintain. Slight changes in Minecraft chat and command output code may require changes in QFAPI. QSL Chat API supports a wider range of messages though and therefore creating such bridge would be beneficial for compatibility with Fabric mods.
Quilt's
CHAT
is invoked on both normal chat messages and commands like/me
Only in the case of RawChatC2SMessage
, as that is the raw message before any handling on the client side (and therefore includes all commands). Otherwise commands are not covered at all in quilt's api.
Ah, that was the investigation that I wanted to see! Hm, yeah, maybe a bridging between both APIs shouldn't be a high priority right now, but if it's feasible? It could be done