Quilted Fabric API (QFAPI) / Quilt Standard Libraries (QSL)

Quilted Fabric API (QFAPI) / Quilt Standard Libraries (QSL)

441k Downloads

Investigate bridging Fabric Message API with Quilt Chat API

EnnuiL opened this issue ยท 5 comments

commented

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

commented

so i have a question that what goes wrong?

commented

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.

commented

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.

commented

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

commented

well certainly dont go investigating right now haha