use of com.infinityraider.agricraft.network.json.MessageSyncPlantJson in project AgriCraft by AgriCraft.
the class PlayerConnectToServerHandler method syncPlants.
private void syncPlants(EntityPlayerMP player) {
log.debug("Sending plants to player: " + player.getDisplayNameString());
final int count = AgriCore.getPlants().getAll().size();
Iterator<AgriPlant> it = AgriCore.getPlants().getAll().iterator();
for (int i = 0; it.hasNext(); i++) {
AgriPlant plant = it.next();
log.debug("Sending plant: {0} ({1} of {2})", plant.getPlantName(), i + 1, count);
new MessageSyncPlantJson(plant, i, count).sendTo(player);
}
log.debug("Finished sending plants to player: " + player.getDisplayNameString());
}
Aggregations