That makes sense. However, the problem that I ran into was that although I iterated through both inventories, their contents would still end up being the same, as demonstrated by the comment on my original post. This leads me to believe that something is happening on Forge or Minecraft’s end where one tick isn’t actually performing as I expect it to; that is, run top-to-bottom twice because of start and end phases.
Making it only run on one phase also doesn’t seem to fix the issue. It’s certainly not exhibiting similar behaviour to Unity3D’s Update() function, which happens every frame.
To answer your question, I’m trying to create a mod that shares a single inventory among every player. I saw it on a YouTube video and thought it would be a fun exercise. I was mistaken. I wish there were more resources on how the game tick works beyond that of Forge’s docs. I can’t figure out the order of how things happen.
I figured each player would check for changes in their inventories and other players would call copyInventory() when a change was detected by looping through the player list in the server.