Fabric API

Fabric API

108M Downloads

ArrayBackedEvent assuming invoker generation when there is single callback

liach opened this issue ยท 3 comments

commented

In the ArrayBackedEvent, the logic assumes that when there is a single callback, it can be used straight as an invoker.

However, this is not the case, as frequently invoker factory has different logic beyond simple dispatches.

An example: https://github.com/FabricMC/fabric/pull/1210/files#diff-11d2ce35b7dd909366a206d94a5b08a5f4d7fb4a37e8949c5e0ad2a741fed199R38-R45

Similarly, some invokers might have some arguments null when invoked, only lazily computed when listeners are present.

commented

Anyone has any comment? I don't know if we have an issue tag for discussion issues.

commented

Wait this issue exists... ๐Ÿ˜„
This will be resolved by #1369.

commented

Closed by the merge of #1369.