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());
}
Aggregations