FTB ProjectEX

FTB ProjectEX

12M Downloads

Learning items via API (not tablet) doesn't sync with client properly

pkmnfrk opened this issue ยท 2 comments

commented

In pkmnfrk/equivalentintegrations#34 it was reported that learning an item via the Transmutation Chamber causes it not to be visible in the Transmutation Tablet. My own research reveals that this is only the case when ProjectEX is installed. Here's what I know:

  1. The Chamber calls IKnowlegeProvider.addKnowledge, with the provider acquired from ProjectEX (which seems to be the default ProjectE provider) (and I have stepped through this code, and it seems all correct)
  2. ProjectE fires a KnowledgeChangeEvent, which I respond to server side
  3. During this event, the new item appears in the knowledge data, meaning the server side is 100% cool
  4. A knowledge sync is triggered to the client (by means unknown to me, but likely somewhere in ProjectEX)
  5. That knowledge does not include the new item
  6. Even if you learn new items via the tablet, the missing item will not appear until you manually add it to the tablet (or log out and back in again)
  7. In spite of server/client terminology above, I have observed this in SSP.
commented

You have to call sync() manually to sync it, PEX doesn't change anything there

commented

You are correct.

The root cause of this was that when I added support for your API, I accidentally created a code path where I did not sync in a few places. My bad!