Search in sources :

Example 1 with MessageSyncMutationJson

use of com.infinityraider.agricraft.network.json.MessageSyncMutationJson in project AgriCraft by AgriCraft.

the class PlayerConnectToServerHandler method syncMutations.

private void syncMutations(EntityPlayerMP player) {
    LOG.debug("Sending mutations to player: " + player.getDisplayNameString());
    final int count = AgriCore.getMutations().getAll().size();
    final Iterator<AgriMutation> it = AgriCore.getMutations().getAll().iterator();
    for (int i = 0; it.hasNext(); i++) {
        AgriMutation mutation = it.next();
        LOG.debug("Sending mutation: ({0} of {1})", i + 1, count);
        new MessageSyncMutationJson(mutation, i, count).sendTo(player);
    }
    LOG.debug("Finished sending mutations to player: " + player.getDisplayNameString());
}
Also used : AgriMutation(com.agricraft.agricore.plant.AgriMutation) MessageSyncMutationJson(com.infinityraider.agricraft.network.json.MessageSyncMutationJson)

Aggregations

AgriMutation (com.agricraft.agricore.plant.AgriMutation)1 MessageSyncMutationJson (com.infinityraider.agricraft.network.json.MessageSyncMutationJson)1