Useful Backpacks

Useful Backpacks

20M Downloads

[1.12.2] Items don't appear instantly

HyCraftHD opened this issue ยท 0 comments

commented

Describe the bug
When a player on a server opens the backpack the container shows for a short time an empty backpack. This is caused by opening the container on the client and server side. The server side with the items then overrides this after a tick.

We should call the open gui method only on the server side and not on both:

player.openGui(UsefulBackpacksMod.getInstance(), hand == EnumHand.MAIN_HAND ? 0 : 1, world, 0, 0, 0);

To Reproduce
Steps to reproduce the behavior:

  1. Open the backpack on a server

Expected behavior
Items should appear instantly

Versions

  • Mod version: 1.12.2-1.5.1.37
  • Minecraft version: 1.12.2
  • Forge version: Irrelevant
  • UTeamCore version: Irrelevant