The source code does some really weird things.I've been trying to get some aspects of my mod working on with a server. I've been using "Main.NewText("something");" and "Console.WriteLine("something else");" to see what does and doesn't happen, and I've noticed some odd things.
When I use an item, the UseItem hook isn't called on the owner in singleplayer or the owner's client in multiplayer, but it is called on the server and other clients. I've also noticed that the Shoot hook is only called on the client of the item's owner, but not other clients or the server.
Are these bugs or intentional behaviour?
Because the UseItem hook is called on the server, it allows for things like NPCs to spawn. Because the Shoot hook is called only on the client, it allows for the projectile's owner to be easily set (and also makes it so that you can see what you shoot right away).