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

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

513k Downloads

Client Crash due to QFAPI non-parity to FAPI on Content Registries v0

fzzyhmstrs opened this issue ยท 4 comments

commented

Context:
Mod crashing: mcdw 5.0.1 1.19.2 (Minecraft Dungeons Weapons)
QFAPI: 4.0.0-beta.30+0.76.0-1.19.2
Sub-API of concern: Quilted Fabric Content Registries (v0): 4.0.0-beta.30+0.76.0-1.19.2

Player is seeing a crash on right clicking a block. Almost immediately, the culprit of AxeItemAccessor jumps out. After a short github repo search it seems like QFAPI doesn't have this accessor at all. Digging a little further, it seems that there are several missing accessors actually. While these are marked as "internal", I don't see any strong logic behind not having parity in impl here to avoid random issues like this (on the accessors at least; the mixins aren't useful in secondary contexts).

image

commented

Mixins are not part of api, they are implementation details.

commented

Ragardless, it causes an easily avoidable issue that can be added (and indeed is in FAPI)

commented

The issue is that not even Fabric API wants that class to be used; It's an implementation detail, it's only meant to be used for making the API work and nothing else; Fabric mods aren't supposed to use it! Their devs get mad at that! They don't apply the same "support the legacy thing forever" approach that they have for some of their APIs, the mod's going to be broken because of the implementation detail that it has been using has been either altered or deleted, and they aren't going to warn people about that
Unless an accessor ends being a massive issue widespread across many mods (and we do have few), it is better for the mod to fix their issue in the end, it's good practice in the end and makes the mod resilient to whatever the heck Fabric API ends doing behind its scenes

commented

@EnnuiL Ah, thank you for that clarification! I've made it a point to make an insulated accessor rather than using the one in the FAPI and that solved the issue that people were experiencing with MCDW :)