use of com.minecolonies.coremod.network.messages.server.ResourceScrollSaveWarehouseSnapshotMessage in project minecolonies by Minecolonies.
the class WindowResourceList method saveWarehouseSnapshotData.
/**
* Save the snapshot data to the compound data.
*/
private void saveWarehouseSnapshotData() {
if (compound != null) {
CompoundNBT newData = new CompoundNBT();
warehouseSnapshot.keySet().forEach(f -> newData.putInt(f, warehouseSnapshot.getOrDefault(f, 0)));
compound.put(TAG_WAREHOUSE_SNAPSHOT, newData);
compound.putString(TAG_WAREHOUSE_SNAPSHOT_WO_HASH, workOrderHash);
Network.getNetwork().sendToServer(new ResourceScrollSaveWarehouseSnapshotMessage(buildingPos, warehouseSnapshot, workOrderHash));
}
}
Aggregations