Search in sources :

Example 1 with MessageSyncSoilJson

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

the class PlayerConnectToServerHandler method syncSoils.

private void syncSoils(EntityPlayerMP player) {
    LOG.debug("Sending soils to player: " + player.getDisplayNameString());
    final int count = AgriCore.getSoils().getAll().size();
    Iterator<AgriSoil> it = AgriCore.getSoils().getAll().iterator();
    for (int i = 0; it.hasNext(); i++) {
        AgriSoil soil = it.next();
        LOG.debug("Sending Soil: {0} ({1} of {2})", soil, i + 1, count);
        new MessageSyncSoilJson(soil, i, count).sendTo(player);
    }
    LOG.debug("Finished sending soils to player: " + player.getDisplayNameString());
}
Also used : MessageSyncSoilJson(com.infinityraider.agricraft.network.json.MessageSyncSoilJson) AgriSoil(com.agricraft.agricore.plant.AgriSoil)

Aggregations

AgriSoil (com.agricraft.agricore.plant.AgriSoil)1 MessageSyncSoilJson (com.infinityraider.agricraft.network.json.MessageSyncSoilJson)1