Easy NPC

Easy NPC

2M Downloads

[Bug] Players Inventory got not refreshed automatically with "interaction" command or dialog button actions and placed items.

HazyOz opened this issue · 4 comments

commented

CobblemonTrainers “setwincommand” and "EasyNPC" dialogue text options/yes/no

The reward doesn’t go into players inventory after winning UNTIL you re-open and close the NPCs dialogue box again, the server msg appears, just no reward until you open/close dialogue box again, if you click "yes" to proceed to a battle, it stacks the item until you claim it by opening/closing the NPCs dialogue box

Without the dialogue/yes/no options it goes straight to the players inventory as intended

P.S asked on CobblemonTrainers they say it's NPC issue

commented

npcs.zip

easy_npc_1.20.1-4.4.0

CobblemonTrainers-forge-0.9.12+1.20.1

UPDATE : problem is only occuring when creator makes the NPC, my friend tested on a NPC i created, his reward goes straight into the inventory, when i goto battle it does the problem where i have to open and esc the dialougue

commented

Thanks for the report.

Could you please share more details on this like an exported NPC with the corresponding settings and the version of the mods.

commented

Thanks for the update.
Technically the commands gets executed as expected and the items goes to the player inventory (on the server side).

However the player inventory (on the client side) is not refreshed / synced after the action, for this reason you need to re-open the UI to trigger a refresh of the player inventory on the client side.

Refreshing / syncing the players inventory could be done from both mods like from the CobblemonTrainers mod and/or from the Easy NPC mod.

I will run some test to see if there is any harm to automatically refresh the players inventory after specific actions to avoid such issues.

commented

With the latest update the inventory get's automatically refreshed after closing a dialog (close button, ESC button, ...).
So there should be no longer the need to re-open a dialog to see inventory changes.

However the inventory will not be refreshed as long the dialog is open, because it would break other parts if I would do something like this.