use of com.minecolonies.coremod.network.messages.client.colony.ColonyViewWorkOrderMessage in project minecolonies by Minecolonies.
the class ColonyPackageManager method sendWorkOrderPackets.
@Override
public void sendWorkOrderPackets() {
final IWorkManager workManager = colony.getWorkManager();
if (workManager.isDirty() || !newSubscribers.isEmpty()) {
final Set<ServerPlayerEntity> players = new HashSet<>();
players.addAll(closeSubscribers);
players.addAll(newSubscribers);
List<IWorkOrder> workOrders = new ArrayList<>(workManager.getWorkOrders().values());
players.forEach(player -> Network.getNetwork().sendToPlayer(new ColonyViewWorkOrderMessage(colony, workOrders), player));
workManager.setDirty(false);
}
}
use of com.minecolonies.coremod.network.messages.client.colony.ColonyViewWorkOrderMessage in project minecolonies by ldtteam.
the class ColonyPackageManager method sendWorkOrderPackets.
@Override
public void sendWorkOrderPackets() {
final IWorkManager workManager = colony.getWorkManager();
if (workManager.isDirty() || !newSubscribers.isEmpty()) {
final Set<ServerPlayerEntity> players = new HashSet<>();
players.addAll(closeSubscribers);
players.addAll(newSubscribers);
List<IWorkOrder> workOrders = new ArrayList<>();
for (final IWorkOrder workOrder : workManager.getWorkOrders().values()) {
if (!(workOrder instanceof WorkOrderBuildMiner)) {
workOrders.add(workOrder);
}
}
players.forEach(player -> Network.getNetwork().sendToPlayer(new ColonyViewWorkOrderMessage(colony, workOrders), player));
workManager.setDirty(false);
}
}
Aggregations