I just started playing around with mods, and I was wondering what code should run on the server only, and what should run on both the server and the client. For example, what I have gathered is that entities will send packets to the clients about their internal state, so I will only need to summon an entity on the server, and put movement logic on the server. (Please correct me if I am wrong)
Since 1.7.* forge made tick handling into an event (TickEvent.*), I was also wondering about which events I should register to for some logic. Since TickEvent.ServerTickEvent is fired both on Phase.Start and Phase.End, and inspection of MinecraftServer shows that the Phase.Start is fired before everything else, and Phase.End is fired after everything else.
I am currently working on some stuff related to multiblocks, and I have a "controller" that controls the central logic of the entire multiblock. I figured that since there will be no packets send about the internal state of my multiblocks, and the code ran should produce the same results for everyone, I will handle both ServerTickEvent and ClientTickEvent. But, I am confused as to run the logic when it is on Phase.START or Phase.END. Is there a difference?
So, what I am asking are basically the following:
[*]What are the general guidelines for running code on either on the server only, or both the server on the client?
[*]Is intercepting TickEvent the correct solution, and if so, is there a difference between Phase.START and Phase.END?